fix tests
This commit is contained in:
@ -350,7 +350,7 @@ def test_root_filter(obj_1, obj_1_1, obj_1_1_1, obj_2, obj_3, u1_s1):
|
||||
assert len(response['results']) == 2
|
||||
|
||||
with scopes_disabled():
|
||||
obj_2.move(obj_1, 'sorted-child')
|
||||
obj_2.move(obj_1, 'last-child')
|
||||
# should return direct children of obj_1 (obj_1_1, obj_2), ignoring query filters
|
||||
response = json.loads(u1_s1.get(f'{reverse(LIST_URL)}?root={obj_1.id}').content)
|
||||
assert response['count'] == 2
|
||||
@ -360,7 +360,7 @@ def test_root_filter(obj_1, obj_1_1, obj_1_1_1, obj_2, obj_3, u1_s1):
|
||||
|
||||
def test_tree_filter(obj_1, obj_1_1, obj_1_1_1, obj_2, obj_3, u1_s1):
|
||||
with scopes_disabled():
|
||||
obj_2.move(obj_1, 'sorted-child')
|
||||
obj_2.move(obj_1, 'last-child')
|
||||
# should return full tree starting at obj_1 (obj_1_1_1, obj_2), ignoring query filters
|
||||
response = json.loads(u1_s1.get(f'{reverse(LIST_URL)}?tree={obj_1.id}').content)
|
||||
assert response['count'] == 4
|
||||
|
Reference in New Issue
Block a user