コード例 #1
0
ファイル: test_service.py プロジェクト: lilnana00/3ddd
    def _do_textsearch(self):
        service = AccuWeatherService(ServiceConfiguration.from_data("rest", "accuweather", "weather"))
        self.assertIsNotNone(service)

        client = AccuWeatherServiceTestClient()
        service.initialise(client)

        response = service.textsearch("Kinghorn")
        self.assertResponse(response, 'textsearch', 'accuweather', 'weather')

        key = AccuWeatherService.get_location_key(response)
        self.assertIsNotNone(key)
        self.assertEquals("3385695", key)
コード例 #2
0
ファイル: test_service.py プロジェクト: lilnana00/3ddd
    def _do_postcodesearch(self):
        service = AccuWeatherService(ServiceConfiguration.from_data("rest", "accuweather", "weather"))
        self.assertIsNotNone(service)

        client = AccuWeatherServiceTestClient()
        service.initialise(client)

        response = service.postcodesearch("KY3 9UR")
        self.assertResponse(response, 'postcodesearch', 'accuweather', 'weather')

        key = AccuWeatherService.get_location_key(response)
        self.assertIsNotNone(key)
        self.assertEquals("47724_PC", key)