test shopping list sharing

This commit is contained in:
smilerz
2021-12-08 11:09:11 -06:00
parent b146e75daa
commit 6448c062f9
2 changed files with 39 additions and 3 deletions

View File

@ -53,11 +53,11 @@ def non_exist():
@pytest.fixture()
def obj_tree_1(request, space_1):
try:
params = request.param
params = request.param # request.param is a magic variable
except AttributeError:
params = {}
objs = []
objs.extend(FoodFactory.create_batch(3, space=space_1, **params)) # request.param is a magic variable
objs.extend(FoodFactory.create_batch(3, space=space_1, **params))
objs[0].move(objs[1], node_location)
objs[1].move(objs[2], node_location)
return Food.objects.get(id=objs[1].id) # whenever you move/merge a tree it's safest to re-get the object