def setUp(self): with open(os.path.join(BASE_DIR, 'example_data.txt'), 'r') as data_file: self.data = data_file.readlines() self.line = _find_station_line('DEN', self.data) self.winds = _parse_station_line(self.line) self.winds_dict = self.winds.dict()
def test_cvg_leading_and_trailing_spaces_airport_code(self): station_line = _find_station_line(' CVG ', self.data) self.assertIn('CVG', station_line)
def test_bogus_airport_code(self): with self.assertRaises(ValueError): _find_station_line('fjaksdlf', self.data)
def test_cvg_uppercase_airport_code(self): station_line = _find_station_line('CVG', self.data) self.assertIn('CVG', station_line)
def setUp(self): with open(os.path.join(BASE_DIR, 'example_data.txt'), 'r') as data_file: self.data = data_file.readlines() self.line = _find_station_line('CVG', self.data) self.winds = _parse_station_line(self.line)
def test_bogus_airport_code(self): with self.assertRaises(ValueError): _find_station_line('fjaksdlf', self.data)
def test_cvg_leading_and_trailing_spaces_airport_code(self): station_line = _find_station_line(' CVG ', self.data) self.assertIn('CVG', station_line)
def test_cvg_uppercase_airport_code(self): station_line = _find_station_line('CVG', self.data) self.assertIn('CVG', station_line)