Skip to content

Commit

Permalink
feat: working test
Browse files Browse the repository at this point in the history
  • Loading branch information
mel-liow committed Jan 17, 2022
1 parent 3a36a77 commit ca816a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/airpyllution/airpyllution.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ def get_pollution_history(start_date, end_date, lat, lon, api_key):

print(url)
print(params)
print(os.environ.get('OPEN_WEATHER_MAP_API_KEY'))
response = requests.request(method=method, url=url, params=params)
print(response)
data = json.loads(response.text)
# print(os.environ.get('OPEN_WEATHER_MAP_API_KEY'))
# response = requests.request(method=method, url=url, params=params)
# print(response)
# data = json.loads(response.text)

return "This function currently returns a string"

Expand Down
2 changes: 1 addition & 1 deletion tests/test_airpyllution.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ def test_pollution_history():
# print(os.getenv('OPEN_WEATHER_MAP_API_KEY'))

actual = airpyllution.get_pollution_history(params['lat'], params['lon'], params['start'], params['end'], params['appid'])
expected = "This function currently returns atring"
expected = "This function currently returns a string"
assert actual == expected, "pollution history incorrectly returns string"

0 comments on commit ca816a8

Please sign in to comment.