Skip to content

Commit

Permalink
DBC22-1485: unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd committed Apr 3, 2024
1 parent f5111e1 commit 4019a86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/backend/apps/weather/tests/test_regionalweather_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ def test_get_forecasts(self):
forecasts = self.weather.get_forecasts()
test_str = self.weather.__str__()
assert len(forecasts) == 0
assert test_str == 'Regional Forecast for ' + str(self.weather.id)
assert test_str == 'Regional Forecast for ' + str(self.weather.code) + ' (' + str(self.weather.station) + ')'
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@ def setUp(self):
self.serializer_two = RegionalWeatherSerializer(self.regional_weather_2)

def test_serializer_data(self):
assert len(self.serializer.data) == 14 # literal lat/long are not serialized
assert self.serializer.data['code'] == \
"s0000341"
assert len(self.serializer.data) == 9 # 2024/04/03 now 9 static fields with no code
assert self.serializer.data['location']['coordinates'] == \
[-124.64, 58.66]

assert self.serializer_two.data['code'] == \
"s0000849"
assert self.serializer_two.data['location']['coordinates'] == \
[-123.94, 57.06]

0 comments on commit 4019a86

Please sign in to comment.