Skip to content

Commit

Permalink
Update data= to json= in some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhblum committed Jan 26, 2024
1 parent 9db3b35 commit 494bc9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testing/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,35 +749,35 @@ def test_invalid_forecast_parameters(self):
'horizon': 'foo',
'interval': 300}
payload = requests.put('{0}/forecast'.format(self.url),
data=forecast_parameters_ref)
json=forecast_parameters_ref)
self.compare_error_code(payload, "Invalid non-numeric horizon in forecast request did not return 400 message.")
# Try setting non-numeric interval
forecast_parameters_ref = {'point_names':forecast_points,
'horizon': 3600,
'interval': 'foo'}
payload = requests.put('{0}/forecast'.format(self.url),
data=forecast_parameters_ref)
json=forecast_parameters_ref)
self.compare_error_code(payload, "Invalid non-numeric interval in forecast request did not return 400 message.")
# Try setting negative horizon
forecast_parameters_ref = {'point_names':forecast_points,
'horizon': -3600,
'interval': 300}
payload = requests.put('{0}/forecast'.format(self.url),
data=forecast_parameters_ref)
json=forecast_parameters_ref)
self.compare_error_code(payload, "Invalid negative horizon in forecast request did not return 400 message.")
# Try setting negative interval
forecast_parameters_ref = {'point_names':forecast_points,
'horizon': 3600,
'interval': -300}
payload = requests.put('{0}/forecast'.format(self.url),
data=forecast_parameters_ref)
json=forecast_parameters_ref)
self.compare_error_code(payload, "Invalid negative interval in forecast request did not return 400 message.")
# Try setting invalid point name
forecast_parameters_ref = {'point_names':['foo'],
'horizon': 3600,
'interval': 300}
payload = requests.put('{0}/forecast'.format(self.url),
data=forecast_parameters_ref)
json=forecast_parameters_ref)
self.compare_error_code(payload, "Invalid point_names in forecast request did not return 400 message.")

def test_invalid_scenario(self):
Expand Down

0 comments on commit 494bc9f

Please sign in to comment.