From 99f4c71ee134853f0e1fd7045e63f1383abb993c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 16 Jun 2023 13:04:37 +0200 Subject: [PATCH] fix test --- tests/files/devices_lots.csv | 2 +- tests/test_metrics.py | 6 +++--- tests/test_render_2_0.py | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/files/devices_lots.csv b/tests/files/devices_lots.csv index d9bd6680..abb9e9d5 100644 --- a/tests/files/devices_lots.csv +++ b/tests/files/devices_lots.csv @@ -1,2 +1,2 @@ "DHID";"Lot Id";"Lot Name";"Lot Type";"Transfer Status";"Transfer Code";"Transfer Date";"Transfer Creation Date";"Transfer Update Date" -"O48N2";"b33c5a0d-bc80-453f-805a-560fab88a761";"lot1";"Temporary";"";"";"";"";"" +"93652";"b33c5a0d-bc80-453f-805a-560fab88a761";"lot1";"Temporary";"";"";"";"";"" diff --git a/tests/test_metrics.py b/tests/test_metrics.py index 706e7260..e81d7af9 100644 --- a/tests/test_metrics.py +++ b/tests/test_metrics.py @@ -160,7 +160,7 @@ def test_metrics_action_status(user: UserClient, user2: UserClient): head += '"Status Supplier – Created Date";"Status Receiver – Created Date";"Trade-Weight";' head += '"Action-Create";"Allocate-Start";"Allocate-User-Code";"Allocate-NumUsers";' head += '"UsageTimeAllocate";"Type";"LiveCreate";"UsageTimeHdd"\n' - body = '"O48N2";"adebcc5506213fac43cd8473a9c81bcf0cadaed9cb98b2eae651e377a3533c5a";' + body = '"93652";"adebcc5506213fac43cd8473a9c81bcf0cadaed9cb98b2eae651e377a3533c5a";' body += '"";"Status";"";"foo@foo.com";"Receiver";"";"";"Use";"";"' assert head in csv_str assert body in csv_str @@ -207,7 +207,7 @@ def test_complet_metrics_with_trade(user: UserClient, user2: UserClient): query=[('filter', {'type': ['Computer'], 'ids': devices_id})], ) - body1_lenovo = '"O48N2";"adebcc5506213fac43cd8473a9c81bcf0cadaed9cb98b2eae651e377a3533c5a";"";"Trade";"foo@foo.com";' + body1_lenovo = '"93652";"adebcc5506213fac43cd8473a9c81bcf0cadaed9cb98b2eae651e377a3533c5a";"";"Trade";"foo@foo.com";' body1_lenovo += '"foo2@foo.com";"Supplier";"NeedConfirmation";"Use";"";' body2_lenovo = ';"";"0";"0";"Trade";"0";"0"\n' @@ -232,7 +232,7 @@ def test_complet_metrics_with_trade(user: UserClient, user2: UserClient): query=[('filter', {'type': ['Computer'], 'ids': devices_id})], ) - body1_lenovo = '"O48N2";"adebcc5506213fac43cd8473a9c81bcf0cadaed9cb98b2eae651e377a3533c5a";"";"Trade";"foo@foo.com";' + body1_lenovo = '"93652";"adebcc5506213fac43cd8473a9c81bcf0cadaed9cb98b2eae651e377a3533c5a";"";"Trade";"foo@foo.com";' body1_lenovo += '"foo2@foo.com";"Supplier";"NeedConfirmation";"Use";"Use";' body2_lenovo = ';"";"0";"0";"Trade";"0";"0"\n' body2_acer = ';"";"0";"0";"Trade";"0";"4692.0"\n' diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 4e10a86d..2665d12a 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -531,7 +531,7 @@ def test_add_monitor(user3: UserClientFlask): assert dev.placeholder.id_device_supplier == "b2" assert dev.hid == 'monitor-samsung-lc27t55-aaaab' assert phid == '1' - assert dhid == 'O48N2' + assert dhid == '93652' txt = f'Device "{typ}" placeholder with PHID {phid} and DHID {dhid} ' txt += 'created successfully' @@ -571,7 +571,7 @@ def test_update_monitor(user3: UserClientFlask): assert dev.placeholder.id_device_supplier == "b2" assert dev.hid == 'monitor-samsung-lc27t55-aaaab' assert phid == '1' - assert dhid == 'O48N2' + assert dhid == '93652' assert dev.model == 'lc27t55' assert dev.depth == 0.1 assert dev.placeholder.pallet == "l34" @@ -640,7 +640,7 @@ def test_add_2_monitor(user3: UserClientFlask): assert dev.placeholder.id_device_supplier == "b1" assert dev.hid == 'monitor-samsung-lc27t55-aaaab' assert phid == '1' - assert dhid == 'O48N2' + assert dhid == '93652' assert dev.model == 'lc27t55' assert dev.placeholder.pallet == "l34" @@ -717,7 +717,7 @@ def test_add_laptop(user3: UserClientFlask): dev.chid == '274f05421e4d394c5b3cd10266fed6f0500029b104b5db3521689bda589e3150' ) assert phid == '1' - assert dhid == 'O48N2' + assert dhid == '93652' txt = f'Device "{typ}" placeholder with PHID {phid} and DHID {dhid} ' txt += 'created successfully' @@ -1891,7 +1891,7 @@ def test_edit_laptop(user3: UserClientFlask): assert dev.serial_number == 'aaaab' assert dev.model == 'lc27t55' assert phid == '1' - assert dhid == 'O48N2' + assert dhid == '93652' txt = f'Device "{typ}" placeholder with PHID {phid} and DHID {dhid} ' txt += 'created successfully'