- test_backend.assert_locations_same(fileBackend, backend)
-
- def test_task(self):
- fileBackend = file_backend.FileBackend(os.tmpnam())
- backend = cache_backend.LazyCacheBackend(fileBackend)
- proj1Id = backend.add_project("p1")
- proj2Id = backend.add_project("p2")
-
- test_backend.exercise_task(backend, proj1Id, proj2Id)
-
- test_backend.assert_tasks_same(fileBackend, backend, proj1Id)
- test_backend.assert_tasks_same(fileBackend, backend, proj2Id)
+ # Confirm cache matches actual
+ fileLocations = list(fileBackend.get_locations())
+ fileLocations.sort()
+ cacheLocations = list(backend.get_locations())
+ cacheLocations.sort()
+ assert fileLocations == cacheLocations