diff --git a/tests/unit_tests/connections/insert/test_async_http.py b/tests/unit_tests/connections/insert/test_async_http.py index 030df438..dd406167 100644 --- a/tests/unit_tests/connections/insert/test_async_http.py +++ b/tests/unit_tests/connections/insert/test_async_http.py @@ -52,8 +52,9 @@ async def test_insert_record_id_result_error(self): with self.assertRaises(Exception) as context: _ = await self.connection.insert(record_id, self.insert_data) + e = str(context.exception) self.assertEqual( - "There was a problem with the database: Can not execute INSERT statement using value 'user:tobie'" in str(context.exception), + "There was a problem with the database: Can not execute INSERT statement using value" in e and "user:tobie" in e, True ) await self.connection.query("DELETE user;") diff --git a/tests/unit_tests/connections/insert/test_async_ws.py b/tests/unit_tests/connections/insert/test_async_ws.py index 0f9e69b2..88f51dc8 100644 --- a/tests/unit_tests/connections/insert/test_async_ws.py +++ b/tests/unit_tests/connections/insert/test_async_ws.py @@ -53,8 +53,9 @@ async def test_insert_record_id_result_error(self): with self.assertRaises(Exception) as context: _ = await self.connection.insert(record_id, self.insert_data) + e = str(context.exception) self.assertEqual( - "There was a problem with the database: Can not execute INSERT statement using value 'user:tobie'" in str(context.exception), + "There was a problem with the database: Can not execute INSERT statement using value" in e and "user:tobie" in e, True ) await self.connection.query("DELETE user;") diff --git a/tests/unit_tests/connections/insert/test_blocking_http.py b/tests/unit_tests/connections/insert/test_blocking_http.py index 23e58d47..997bc96c 100644 --- a/tests/unit_tests/connections/insert/test_blocking_http.py +++ b/tests/unit_tests/connections/insert/test_blocking_http.py @@ -57,8 +57,10 @@ def test_insert_record_id_result_error(self): with self.assertRaises(Exception) as context: _ = self.connection.insert(record_id, self.insert_data) - self.assertTrue( - "There was a problem with the database: Can not execute INSERT statement using value 'user:tobie'" in str(context.exception) + e = str(context.exception) + self.assertEqual( + "There was a problem with the database: Can not execute INSERT statement using value" in e and "user:tobie" in e, + True ) self.connection.query("DELETE user;") diff --git a/tests/unit_tests/connections/insert/test_blocking_ws.py b/tests/unit_tests/connections/insert/test_blocking_ws.py index 02066946..8fc8367d 100644 --- a/tests/unit_tests/connections/insert/test_blocking_ws.py +++ b/tests/unit_tests/connections/insert/test_blocking_ws.py @@ -56,9 +56,10 @@ def test_insert_record_id_result_error(self): with self.assertRaises(Exception) as context: _ = self.connection.insert(record_id, self.insert_data) - self.assertTrue( - "There was a problem with the database: Can not execute INSERT statement using value 'user:tobie'" - in str(context.exception) + e = str(context.exception) + self.assertEqual( + "There was a problem with the database: Can not execute INSERT statement using value" in e and "user:tobie" in e, + True )