def test_situation_has_not_started_yet(self):
     start_time = datetime.now(
         pytz.timezone('US/Eastern')) + timedelta(days=2)
     end_time = ""
     xml = self.__get_xml_with_args('situation_no_summary.xml',
                                    format_time(start_time),
                                    format_time(end_time))
     requests.get = MagicMock(return_value=MockedResponse(str.encode(xml)))
     self.status_service.update_status()
     situations = self.status_service.situations
     self.assertFalse(situations)  # The start date is in the future
Ejemplo n.º 2
0
 def test_format_string(self):
     formatted_string = format_time(datetime.now())
     self.assertIsNotNone(formatted_string)
     self.assertTrue(formatted_string)
Ejemplo n.º 3
0
 def test_format_string_none(self):
     formatted_string = format_time(None)
     self.assertIsNone(formatted_string)
     self.assertFalse(formatted_string)