Пример #1
0
 def test_weather_page_city_temperature_information(self):
     city_name = TestData.City_Name
     page = WeatherPage(self.driver)
     page.pin_your_city(city_name)
     temperature_info = page.city_temperature_information_from_map(
         city_name)
     assert Utility.is_valid_number(temperature_info[Constants.CEL_CLASS])
     assert Utility.is_valid_number(temperature_info[Constants.FAR_CLASS])
Пример #2
0
    def test_weather_api_city_latitude_longitude(self):
        log(
            Constants.TEST_START_LOG_MESSAGE.format(
                sys._getframe().f_code.co_name))
        response = WeatherApi.get_weather_data_for_city(
            TestData.City_Name, Constants.FAR_UNIT, BaseConfig.TOKEN)

        assert response.status_code == 200
        json_data = response.json()

        assert Utility.is_valid_number(json_data["coord"]["lat"])
        assert Utility.is_valid_number(json_data["coord"]["lon"])
        log(
            Constants.TEST_END_LOG_MESSAGE.format(
                sys._getframe().f_code.co_name))
 def test_verify(self):
     func_name = util.func_name()
     log = self.getLogger(func_name)
     month = self.get_month('11')
     print(month)
     date = datetime.today().strftime('%m/%d/%Y')
     print(date)
     count = self.auto_inc()
     print("COUNT: " + str(count))
     log.info("Hello Test message")
Пример #4
0
    def test_weather_api_city_temperature_in_fahrenheit(self):
        log(
            Constants.TEST_START_LOG_MESSAGE.format(
                sys._getframe().f_code.co_name))
        response = WeatherApi.get_weather_data_for_city(
            TestData.City_Name, Constants.FAR_UNIT, BaseConfig.TOKEN)

        assert response.status_code == 200
        json_data = response.json()

        assert Utility.is_valid_number(json_data["main"]["temp"])
        log(
            Constants.TEST_END_LOG_MESSAGE.format(
                sys._getframe().f_code.co_name))
    def __init__(self, split=[70,20,10], filename="model"):
        if not os.path.exists(MODEL_PATH):
            os.makedirs(MODEL_PATH)
        if not os.path.exists(TRAINED_PATH):
            os.makedirs(TRAINED_PATH)
        if not os.path.exists(PERF_PATH):
            os.makedirs(PERF_PATH)
        if not os.path.exists(LAYER_IMG):
            os.makedirs(LAYER_IMG)

        self.viz = Visualize()
        self.dataset = Dataset()
        self.utility = Utility(filename)
        self.dataset.LoadData("Field_Serra*.csv", "list_t*.csv", split)
        self.filename = filename