summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEoghan Glynn <eglynn@redhat.com>2013-06-24 18:36:13 +0000
committerEoghan Glynn <eglynn@redhat.com>2013-06-24 19:42:44 +0100
commit52e3f6ffe188a82a67fdd573bb03ab1d9b0b95b4 (patch)
tree00d096c65fc16708facfe65d9ec76553fa10c755 /tests
parentff77aeea56872be38914c851926af1fb504dba5f (diff)
downloadpython-ceilometerclient-1.0.1.tar.gz
Avoid unnecessary GET of existing alarm for update1.0.1
The existing alarm representation is retrieved prior to update, which is uneccessary as the API merges the new and existing state in any case. This change saves the threshold eval logic one unnecessary API call per state transition. Change-Id: If21c53d6f43164315e1e70e62b0c70520fb5a45c
Diffstat (limited to 'tests')
-rw-r--r--tests/v2/test_alarms.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/v2/test_alarms.py b/tests/v2/test_alarms.py
index ac1d2dc..726434d 100644
--- a/tests/v2/test_alarms.py
+++ b/tests/v2/test_alarms.py
@@ -146,8 +146,7 @@ class AlarmManagerTest(unittest.TestCase):
def test_update(self):
alarm = self.mgr.update(alarm_id='alarm-id', **DELTA_ALARM)
expect = [
- ('GET', '/v2/alarms/alarm-id', {}, None),
- ('PUT', '/v2/alarms/alarm-id', {}, UPDATED_ALARM),
+ ('PUT', '/v2/alarms/alarm-id', {}, DELTA_ALARM),
]
self.assertEqual(self.api.calls, expect)
self.assertTrue(alarm)