From 83ade6de8f0c8845e65bd78d5ce74584d40e6c2e Mon Sep 17 00:00:00 2001 From: Xavier Bustamante Talavera Date: Sat, 29 Sep 2018 15:30:20 +0200 Subject: [PATCH] Do not use tests in dummy --- ereuse_devicehub/dummy/dummy.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/dummy/dummy.py b/ereuse_devicehub/dummy/dummy.py index 88024ae0..94276a31 100644 --- a/ereuse_devicehub/dummy/dummy.py +++ b/ereuse_devicehub/dummy/dummy.py @@ -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'])