Do not use tests in dummy

This commit is contained in:
Xavier Bustamante Talavera 2018-09-29 15:30:20 +02:00
parent c0073e9212
commit 83ade6de8f

View file

@ -88,12 +88,16 @@ class Dummy:
}, },
res=m.Event) res=m.Event)
from tests.test_lot import test_post_add_children_view parent, _ = user.post(({'name': 'Parent'}), res=Lot)
child_id = test_post_add_children_view(user) child, _ = user.post(({'name': 'Child'}), res=Lot)
parent, _ = user.post({},
res=Lot,
item='{}/children'.format(parent['id']),
query=[('id', child['id'])])
lot, _ = user.post({}, lot, _ = user.post({},
res=Lot, res=Lot,
item='{}/devices'.format(child_id), item='{}/devices'.format(child['id']),
query=[('id', pc) for pc in itertools.islice(pcs, len(pcs) // 3)]) query=[('id', pc) for pc in itertools.islice(pcs, len(pcs) // 3)])
assert len(lot['devices']) assert len(lot['devices'])