def setUp(self): self.command = ListbackupsCommand() self.command.storage = get_storage() HANDLED_FILES['written_files'] = [(f, None) for f in [ '2015-02-06-042810.bak', '2015-02-07-042810.bak', '2015-02-08-042810.bak', ]]
class ListbackupsCommandTest(TestCase): def setUp(self): self.command = ListbackupsCommand() self.command.storage = get_storage() HANDLED_FILES['written_files'] = [(f, None) for f in [ '2015-02-06-042810.bak', '2015-02-07-042810.bak', '2015-02-08-042810.bak', ]] def test_get_backup_attrs(self): options = {} attrs = self.command.get_backup_attrs(options) self.assertEqual(len(HANDLED_FILES['written_files']), len(attrs))