Пример #1
0
    def test_handler_station_name(self):
        client = NationalRailEnquiriesServiceTestClient()
        conf_file = NationalRailEnquiriesWSDLService.get_default_conf_file()

        response = self._do_handler_load(client, conf_file,
                                         "nationalrailenquiries",
                                         "NRE STATION NAME KGH")
        self.assertIsNotNone(response)
        self.assertEquals("NRE RESULT KINGHORN.", response)
Пример #2
0
    def test_next_train_from_to(self):
        client = NationalRailEnquiriesServiceTestClient()
        conf_file = NationalRailEnquiriesWSDLService.get_default_conf_file()

        response = self._do_handler_load(
            client, conf_file, "nationalrailenquiries",
            "NRE NEXT TRAIN FROM KINGHORN PLATFORM 1 TO EDINBURGH")
        self.assertIsNotNone(response)
        self.assertRegex(response,
                         "The next train from .* to .* is due at .*\.")