def test_record_done_does_not_unlock_all(self): file1 = TEST_FILE_1 file2 = TEST_FILE_3 manager2 = VOSpaceProgressManager(self.context) self.undertest.lock(file1) manager2.lock(file2) self.undertest.record_done(file1) assert_that(manager2.owns_lock(file2), equal_to(True)) manager2.unlock(file2) assert_that(manager2.owns_lock(file2), equal_to(False))
def test_record_done_does_not_unlock_all(self): file1 = TEST_FILE_1 file2 = TEST_FILE_3 manager2 = VOSpaceProgressManager(self.context) self.undertest.lock(file1) manager2.lock(file2) self.undertest.record_done(file1) assert_that(manager2.owns_lock(file2), equal_to(True)) manager2.unlock(file2) assert_that(manager2.owns_lock(file2), equal_to(False))