From 5a24107c810522e05dc1a4489c612847aa1204a5 Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Fri, 29 Dec 2023 21:07:59 -0500 Subject: [PATCH] fix: test getting read-only errors even after running `sys_db.set_mode("default")`. Probably sync issues.. --- tests/test_database.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/test_database.py b/tests/test_database.py index d700a3c0..e7a61dce 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -143,15 +143,8 @@ def test_database_misc_methods(sys_db, db, bad_db, cluster): db.set_mode("readonly") assert err.value.error_code in {11, 1228} - sys_db.set_mode("readonly") - assert db.mode() == "readonly" - - with assert_raises(DatabaseCreateError): - # Should fail because of read-only mode - sys_db.create_database("test") - assert err.value.error_code in {11, 1228} - - sys_db.set_mode("default") + result = sys_db.set_mode("default") + assert result == {"mode": "default"} # Test get server status status = db.status()