1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-20 13:58:33 +00:00

Fix test_revert_ls test

It was unable to parse the mini-dates in the _handle_ls(). Replace
the dates with the full length strings in the BackupSimulator
commands.
This commit is contained in:
David Steele 2020-03-03 15:23:41 -05:00
parent 715a7216b7
commit 60b0e1beb0

View file

@ -288,23 +288,23 @@ class RevertCommandTest(CommandTest):
self.assertEqual(self.errors, "")
def test_revert_ls(self):
backup = BackupSimulator(self.todolist, self.archive, '1', ['add One'])
backup = BackupSimulator(self.todolist, self.archive, '1970-01-01 00:00:01', ['add One'])
command_executer(AddCommand, ["One"], self.todolist, None, self.out, self.error, None)
backup.save(self.todolist)
backup = BackupSimulator(self.todolist, self.archive, '2', ['add Two'])
backup = BackupSimulator(self.todolist, self.archive, '1970-01-01 00:00:02', ['add Two'])
command_executer(AddCommand, ["Two"], self.todolist, None, self.out, self.error, None)
backup.save(self.todolist)
backup = BackupSimulator(self.todolist, self.archive, '3', ['add Three'])
backup = BackupSimulator(self.todolist, self.archive, '1970-01-01 00:00:03', ['add Three'])
command_executer(AddCommand, ["Three"], self.todolist, None, self.out, self.error, None)
backup.save(self.todolist)
backup = BackupSimulator(self.todolist, self.archive, '4', ['delete Three'])
backup = BackupSimulator(self.todolist, self.archive, '1970-01-01 00:00:04', ['delete Three'])
command_executer(DeleteCommand, ["Three"], self.todolist, None, self.out, self.error, None)
backup.save(self.todolist)
backup = BackupSimulator(self.todolist, self.archive, '5', ['add Four'])
backup = BackupSimulator(self.todolist, self.archive, '1970-01-01 00:00:05', ['add Four'])
command_executer(AddCommand, ["Four"], self.todolist, None, self.out, self.error, None)
backup.save(self.todolist)