本文整理汇总了Python中clientraw.ClientRaw类的典型用法代码示例。如果您正苦于以下问题:Python ClientRaw类的具体用法?Python ClientRaw怎么用?Python ClientRaw使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ClientRaw类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_surface_pressure_trend_field_populated_steady
def test_surface_pressure_trend_field_populated_steady(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.SURFACE_PRESSURE_TREND, "0"))
self.assertEqual(Trend.STEADY, testee.get_surface_pressure_trend())
示例2: test_no_field_for_gust_speed
def test_no_field_for_gust_speed(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.GUST_SPEED_KNOTS-1))
self.assertEqual(None, testee.get_gust_speed())
示例3: test_wind_direction_field_populated_with_invalid_value
def test_wind_direction_field_populated_with_invalid_value(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.WIND_DIRECTION_COMPASS_DEGREES, "blah"))
self.assertEqual(None, testee.get_wind_direction())
示例4: test_average_wind_speed_field_populated_with_invalid_value
def test_average_wind_speed_field_populated_with_invalid_value(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.AVERAGE_WIND_SPEED_KNOTS, "blah"))
self.assertEqual(None, testee.get_average_wind_speed())
示例5: test_gust_speed_field_populated
def test_gust_speed_field_populated(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.GUST_SPEED_KNOTS, "5.8"))
self.assertEqual(5.8, testee.get_gust_speed().get_value(WindSpeedUnit.KNOTS))
示例6: test_outdoor_humidity_trend_field_populated_steady
def test_outdoor_humidity_trend_field_populated_steady(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.OUTDOOR_HUMIDITY_TREND, "0"))
self.assertEqual(Trend.STEADY, testee.get_outdoor_humidity_trend())
示例7: test_no_field_for_outdoor_humidity_trend
def test_no_field_for_outdoor_humidity_trend(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.OUTDOOR_HUMIDITY_TREND-1))
self.assertEqual(None, testee.get_outdoor_humidity_trend())
示例8: test_uv_index_field_populated
def test_uv_index_field_populated(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.UV_INDEX, "5.1"))
self.assertEqual(5.1, testee.get_uv_index())
示例9: test_no_field_for_uv_index
def test_no_field_for_uv_index(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.UV_INDEX-1))
self.assertEqual(None, testee.get_uv_index())
示例10: test_dew_point_field_populated_with_invalid_value
def test_dew_point_field_populated_with_invalid_value(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.DEW_POINT_CELSIUS, "blah"))
self.assertEqual(None, testee.get_dew_point())
示例11: test_no_field_for_dew_point
def test_no_field_for_dew_point(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.DEW_POINT_CELSIUS-1))
self.assertEqual(None, testee.get_dew_point())
示例12: test_dew_point_field_populated
def test_dew_point_field_populated(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.DEW_POINT_CELSIUS, "-5.5"))
self.assertEqual(-5.5, testee.get_dew_point().get_value(TemperatureUnit.CELSIUS))
示例13: test_no_field_for_surface_pressure_trend
def test_no_field_for_surface_pressure_trend(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.SURFACE_PRESSURE_TREND-1))
self.assertEqual(None, testee.get_surface_pressure_trend())
示例14: test_surface_pressure_trend_field_populated_with_invalid_value
def test_surface_pressure_trend_field_populated_with_invalid_value(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.SURFACE_PRESSURE_TREND, "blah"))
self.assertEqual(None, testee.get_surface_pressure_trend())
示例15: test_no_field_for_outdoor_temperature_trend
def test_no_field_for_outdoor_temperature_trend(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.OUTDOOR_TEMPERATURE_TREND-1))
self.assertEqual(None, testee.get_outdoor_temperature_trend())