From fed7b24751e4da940fc74efaed77242368077253 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Thu, 5 Oct 2023 21:07:47 -0700 Subject: [PATCH] Fix test that broke due to error message change (#465) Some error messages were changed in #6209. When I first saw this failing, I was very worried that it was a state bug introduced by --- tests/test_async_query.py | 2 +- tests/test_sync_query.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_async_query.py b/tests/test_async_query.py index 90f32458..b2e642b3 100644 --- a/tests/test_async_query.py +++ b/tests/test_async_query.py @@ -1110,7 +1110,7 @@ async def test_dup_link_prop_name(self): ''') async def test_transaction_state(self): - with self.assertRaisesRegex(edgedb.QueryError, "cannot assign to id"): + with self.assertRaisesRegex(edgedb.QueryError, "cannot assign to.*id"): async for tx in self.client.transaction(): async with tx: await tx.execute(''' diff --git a/tests/test_sync_query.py b/tests/test_sync_query.py index 622fceed..79dae829 100644 --- a/tests/test_sync_query.py +++ b/tests/test_sync_query.py @@ -868,7 +868,7 @@ def test_sync_banned_transaction(self): self.client.execute('start transaction') def test_transaction_state(self): - with self.assertRaisesRegex(edgedb.QueryError, "cannot assign to id"): + with self.assertRaisesRegex(edgedb.QueryError, "cannot assign to.*id"): for tx in self.client.transaction(): with tx: tx.execute('''