Put the since-when suffix in since, so its own test covers it
This commit is contained in:
@@ -55,6 +55,13 @@ class TheStatusLines(unittest.TestCase):
|
||||
|
||||
|
||||
class TheTimeSinceParking(unittest.TestCase):
|
||||
def test_is_the_time_of_the_chunks_file_to_the_minute(self) -> None:
|
||||
folder = pathlib.Path(tempfile.mkdtemp())
|
||||
chunk = parked.Parked("ABC-20", "/code/api", "7", "s", "an approval")
|
||||
parked.park(folder, chunk)
|
||||
os.utime(parked.file_of(folder, "ABC-20"), (SINCE, SINCE))
|
||||
self.assertEqual(status.since(folder, chunk), f", since {SINCE_ON}")
|
||||
|
||||
def test_is_empty_where_the_chunks_file_is_gone(self) -> None:
|
||||
self.assertEqual(status.since(pathlib.Path(tempfile.mkdtemp()), parked.Parked("ABC-20", "/code/api", "7", "s", "an approval")), "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user