From c3fd66b3b9e2aa495d1b9eea31627a581b36ff42 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 1 Oct 2025 14:55:54 -0700 Subject: [PATCH 1/2] Remove punctuation that's causing problems --- test/integration/test_query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/test_query.py b/test/integration/test_query.py index 6c6aff4..d6a5dcc 100644 --- a/test/integration/test_query.py +++ b/test/integration/test_query.py @@ -338,7 +338,7 @@ def test_api_save_rows(api: APIWrapper, blood_sample_type_fixture, tissue_sample # Expect to fail this request since the sample name was not specified for one of the rows with pytest.raises(ServerContextError) as e: api.query.save_rows(commands=commands) - assert e.value.message == "400: SampleID or Name is required for sample on row 2." + assert e.value.message == "400: SampleID or Name is required for sample on row 2" # Attempt the same request but with a 13.2 api version resp = api.query.save_rows(api_version=13.2, commands=commands) @@ -346,7 +346,7 @@ def test_api_save_rows(api: APIWrapper, blood_sample_type_fixture, tissue_sample assert resp["errorCount"] == 1 assert ( resp["result"][0]["errors"]["exception"] - == "SampleID or Name is required for sample on row 2." + == "SampleID or Name is required for sample on row 2" ) # Fix the first command by specifying a name for the sample From 451aa4a8f0217c7a66b17725c26ae1f64890e6d4 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 1 Oct 2025 14:59:42 -0700 Subject: [PATCH 2/2] Don't test for equality so we may or may not include punctuation --- test/integration/test_query.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/test_query.py b/test/integration/test_query.py index d6a5dcc..e6a3db3 100644 --- a/test/integration/test_query.py +++ b/test/integration/test_query.py @@ -338,15 +338,16 @@ def test_api_save_rows(api: APIWrapper, blood_sample_type_fixture, tissue_sample # Expect to fail this request since the sample name was not specified for one of the rows with pytest.raises(ServerContextError) as e: api.query.save_rows(commands=commands) - assert e.value.message == "400: SampleID or Name is required for sample on row 2" + + assert "400: SampleID or Name is required for sample on row 2" in e.value.message # Attempt the same request but with a 13.2 api version resp = api.query.save_rows(api_version=13.2, commands=commands) assert resp["committed"] == False assert resp["errorCount"] == 1 assert ( + "SampleID or Name is required for sample on row 2" in resp["result"][0]["errors"]["exception"] - == "SampleID or Name is required for sample on row 2" ) # Fix the first command by specifying a name for the sample