From ea5867e32af2f07d0ce4436c6c639f17e2ccadfc Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 1 Jun 2022 14:00:16 +0200 Subject: [PATCH] fixed tests --- tests/test_basic.py | 2 ++ tests/test_render_2_0.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index f9960219..adbac7b1 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -60,6 +60,8 @@ def test_api_docs(client: Client): '/inventory/lot/{lot_id}/device/', '/inventory/lot/{lot_id}/device/add/', '/inventory/lot/{lot_id}/trade-document/add/', + '/inventory/lot/{lot_id}/transfer/{type_id}/', + '/inventory/lot/{lot_id}/transfer/', '/inventory/lot/{lot_id}/upload-snapshot/', '/inventory/tag/devices/add/', '/inventory/tag/devices/{id}/del/', diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 3db499b8..00784138 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -1134,14 +1134,14 @@ def test_edit_transfer(user3: UserClientFlask): uri = f'/inventory/lot/{lot_id}/device/' body, status = user3.get(uri) assert status == '200 OK' - assert 'Transfer (Open)' not in body + assert 'Transfer (Open)' not in body assert ' Delete Lot' in body # create new incoming lot uri = f'/inventory/lot/{lot_id}/transfer/incoming/' data = {'csrf_token': generate_csrf(), 'code': 'AAA'} body, status = user3.post(uri, data=data) - assert 'Transfer (Open)' in body + assert 'Transfer (Open)' in body assert ' Delete Lot' in body lot = Lot.query.filter()[1] assert lot.transfer is not None @@ -1160,7 +1160,7 @@ def test_edit_transfer(user3: UserClientFlask): assert 'Transfer updated error!' in body assert 'one one one' not in body assert ' Delete Lot' in body - assert 'Transfer (Open)' in body + assert 'Transfer (Open)' in body # # edit transfer successfully data = { @@ -1174,4 +1174,4 @@ def test_edit_transfer(user3: UserClientFlask): assert 'Transfer updated successfully!' in body assert 'one one one' in body assert ' Delete Lot' not in body - assert 'Transfer (Closed)' in body + assert 'Transfer (Closed)' in body