diff --git a/aodh/tests/api/v2/test_alarm_scenarios.py b/aodh/tests/api/v2/test_alarm_scenarios.py index f7655765c..58b228ebd 100644 --- a/aodh/tests/api/v2/test_alarm_scenarios.py +++ b/aodh/tests/api/v2/test_alarm_scenarios.py @@ -1411,8 +1411,6 @@ class TestAlarms(TestAlarmsBase): self._verify_alarm(json, alarm) def test_put_alarm_wrong_field(self): - # Note: wsme will ignore unknown fields so will just not appear in - # the Alarm. json = { 'this_can_not_be_correct': 'ha', 'enabled': False, @@ -1445,9 +1443,10 @@ class TestAlarms(TestAlarmsBase): alarm_id = data[0]['alarm_id'] resp = self.put_json('/alarms/%s' % alarm_id, + expect_errors=True, params=json, headers=self.auth_headers) - self.assertEqual(200, resp.status_code) + self.assertEqual(400, resp.status_code) def test_put_alarm_with_existing_name(self): """Test that update a threshold alarm with an existing name.""" @@ -2210,8 +2209,8 @@ class TestAlarmsRuleThreshold(TestAlarmsBase): } resp = self.post_json('/alarms', params=json, expect_errors=True, status=400, headers=self.auth_headers) - expected_error_message = ("Invalid input for field/attribute field. " - "Value: 'None'. Mandatory field missing.") + expected_error_message = ("Unknown attribute for argument " + "data.threshold_rule.query: q.field") fault_string = resp.json['error_message']['faultstring'] self.assertEqual(expected_error_message, fault_string) alarms = list(self.alarm_conn.get_alarms()) @@ -2230,8 +2229,8 @@ class TestAlarmsRuleThreshold(TestAlarmsBase): } resp = self.post_json('/alarms', params=json, expect_errors=True, status=400, headers=self.auth_headers) - expected_error_message = ("Invalid input for field/attribute value. " - "Value: 'None'. Mandatory field missing.") + expected_error_message = ("Unknown attribute for argument " + "data.threshold_rule.query: q.value") fault_string = resp.json['error_message']['faultstring'] self.assertEqual(expected_error_message, fault_string) alarms = list(self.alarm_conn.get_alarms()) diff --git a/requirements.txt b/requirements.txt index 1a0693f04..4880cfd14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,4 +33,4 @@ stevedore>=1.5.0 # Apache-2.0 tooz>=0.16.0 # Apache-2.0 Werkzeug>=0.7 # BSD License WebOb>=1.2.3 -WSME>=0.7 +WSME>=0.8