From c08b9e89f0eaa583931a47cb0bcaa4ed05932d01 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Thu, 8 Aug 2024 13:03:01 +0530 Subject: [PATCH] Update test_db_lock with new function name --- tests/test_db_lock.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_db_lock.py b/tests/test_db_lock.py index 3a5ff0b0..ecee8b5f 100644 --- a/tests/test_db_lock.py +++ b/tests/test_db_lock.py @@ -13,7 +13,7 @@ def test_process_lock(default_process_lock): lock: ProcessLock = default_process_lock # Assert - assert True == ProcessLockAdapters.is_process_locked(lock.name) + assert True == ProcessLockAdapters.is_process_locked_by_name(lock.name) @pytest.mark.django_db(transaction=True) @@ -25,7 +25,7 @@ def test_expired_process_lock(): time.sleep(3) # Assert - assert False == ProcessLockAdapters.is_process_locked(lock.name) + assert False == ProcessLockAdapters.is_process_locked_by_name(lock.name) @pytest.mark.django_db(transaction=True) @@ -37,7 +37,7 @@ def test_in_progress_lock(default_process_lock): ProcessLockAdapters.run_with_lock(lock.name, lambda: time.sleep(2)) # Assert - assert True == ProcessLockAdapters.is_process_locked(lock.name) + assert True == ProcessLockAdapters.is_process_locked_by_name(lock.name) @pytest.mark.django_db(transaction=True) @@ -49,10 +49,10 @@ def test_run_with_completed(): time.sleep(4) # Assert - assert False == ProcessLockAdapters.is_process_locked("test_run_with") + assert False == ProcessLockAdapters.is_process_locked_by_name("test_run_with") @pytest.mark.django_db(transaction=True) def test_nonexistent_lock(): # Assert - assert False == ProcessLockAdapters.is_process_locked("nonexistent_lock") + assert False == ProcessLockAdapters.is_process_locked_by_name("nonexistent_lock")