Example #1
0
 def setUp(self):
     # When USE_TZ is set, timezone.now is in UTC
     self.date_time = datetime(2018, 12, 29, 22, 30, 15, 400000, tzinfo=utc)
     self.now_func = MagicMock(spec=timezone.now)
     self.now_func.return_value = self.date_time
     self.manager = MeetupManager(now_func=self.now_func)
Example #2
0
 def test_init(self):
     manager = MeetupManager()
     self.assertIsInstance(manager, MeetupManager)
     self.assertEqual(manager.now_func, timezone.now)
Example #3
0
 def setUp(self):
     self.date_time = datetime(2018, 12, 29, 22, 30, 15, 400000)
     self.now_func = MagicMock(spec=timezone.now)
     self.now_func.return_value = self.date_time
     self.manager = MeetupManager(now_func=self.now_func)