1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

JournalLock: Add release_lock() test when not locked.

This commit is contained in:
Athanasius 2021-03-24 17:14:32 +00:00
parent 2fa3428581
commit 8bf5a43c5b

View File

@ -293,6 +293,11 @@ class TestJournalLock:
with open(mock_journaldir / 'edmc-journal-lock.txt', mode='w+') as lf:
assert _obtain_lock('release-lock', lf) is True
def test_release_lock_not_locked(self, mock_journaldir: py_path_local_LocalPath):
"""Test JournalLock.release_lock() when not locked."""
jlock = JournalLock()
assert jlock.release_lock() is True
###########################################################################
# Tests against JournalLock.update_lock()
def test_update_lock(