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
1 changed files with 7 additions and 3 deletions

View File

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