From c38e3cb69ef59cda2a4979ea9c265629942e6463 Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Sat, 16 Sep 2023 10:22:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20DB=E7=A9=BA=E6=96=87=E5=AD=97=E3=80=81IN?= =?UTF-8?q?PUT=E7=A9=BA=E6=96=87=E5=AD=97=E3=81=AE=E3=83=91=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=83=B3=E3=81=AF=E7=95=B0=E5=B8=B8=E3=81=AA=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=81=AA=E3=81=AE=E3=81=A7=E3=80=81=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/jskult-batch-daily/tests/testing_vjsk_utility.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ecs/jskult-batch-daily/tests/testing_vjsk_utility.py b/ecs/jskult-batch-daily/tests/testing_vjsk_utility.py index 441c5c9e..06173c2e 100644 --- a/ecs/jskult-batch-daily/tests/testing_vjsk_utility.py +++ b/ecs/jskult-batch-daily/tests/testing_vjsk_utility.py @@ -113,6 +113,9 @@ def assert_table_results(actual_rows: list[dict], expect_rows: list[dict], ignor elif actual_value == "0000-00-00 00:00:00" and expect_value == "": # DB項目(datetime)がゼロ日付(NULL代替値)の場合、期待値が""であれば"0000-00-00 00:00:00"に置換する expect_value = "0000-00-00 00:00:00" + elif actual_value == "" and expect_value == "": + # DB項目値が空文字のかつ期待値が""のパターンは想定外のパターンであるため、期待値をNoneに置換して失敗させる + expect_value = None # 検証 assert actual_value == expect_value, f'{line_number}行目:"{actual_col_name}" : "{actual_value}" ({type(actual_value)})が、期待値 "{expect_value}" ({type(expect_value)}) と一致しませんでした'