Fix backreferences to the same table
This commit is contained in:
@@ -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