def test_all_from_month_with_in_memory_repo(self): events_repo = EventsRepo(EventsInMemoryRepo()) events = events_repo.all() self.assertEqual( str(events), 'asdf 2019-10-01 07:20:00 entrada\nqwer 2019-10-01 14:35:00 salida\nzxcv 2019-10-15 07:05:30 entrada\nzxcv 2019-10-15 08:05:30 salida\nzxcv 2019-10-15 09:05:30 entrada\nzxcv 2019-10-15 09:15:30 salida\nzxcv 2019-10-15 10:05:30 entrada\nzxcv 2019-10-16 07:05:30 entrada' )
def test_all(self): persistence_mock = Mock() events_repo = EventsRepo(persistence=persistence_mock) events_repo.all() persistence_mock.find_all.assert_called_once()