Fix backreferences to the same table
This commit is contained in:
1 parent
de72d38b8f
commit
40b6650970
3 files changed
+16
-7
No files matched your search
@@ -68,9 +68,13 @@ def test_subgroups(db):
|
||||
snw = db.save(examples.Group(name="Strange New Worlds", members=[pike]))
|
||||
|
||||
starfleet = db.save(examples.Group(name="Starfleet", groups=[tos, snw]))
|
||||
tos = db.table("Group").get(doc_id=tos.doc_id)
|
||||
snw = db.table("Group").get(doc_id=snw.doc_id)
|
||||
assert tos in starfleet.groups
|
||||
assert snw in starfleet.groups
|
||||
|
||||
assert tos.parent.uid == starfleet.uid
|
||||
|
||||
unique_users = set([user for group in starfleet.groups for user in group.members])
|
||||
|
||||
kirk = db.table("User").get(doc_id=kirk.doc_id)
|
||||
|
||||
Reference in new issue
Block a user