mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Update test_db_lock with new function name
This commit is contained in:
parent
64b2073e63
commit
c08b9e89f0
1 changed files with 5 additions and 5 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue