def test_release_lock(tmpdir): locked_file = tmpdir.join("locked_file") locked_file.write("") path = "%s" % locked_file assert store.have_lock(path) == False store.aquire_lock(path) assert store.have_lock(path) == True store.release_lock(path) assert store.have_lock(path) == False
def test_release_lock_not_locked(): store.release_lock("/asdasd/aasdasd")