summaryrefslogtreecommitdiff
path: root/ceilometerclient/tests/v2/test_samples.py
diff options
context:
space:
mode:
authorKui Shi <skuicloud@gmail.com>2013-10-15 00:35:58 +0800
committerKui Shi <skuicloud@gmail.com>2013-10-15 00:51:58 +0800
commitc58320a4eaa6743e59b31ec90f9f4f38cb9e3b3c (patch)
treef83865029e34bce139ccc9eae10aaceaa32c9ec2 /ceilometerclient/tests/v2/test_samples.py
parent253569d0700839e277809f3f0ee8c662dedfdbea (diff)
downloadpython-ceilometerclient-c58320a4eaa6743e59b31ec90f9f4f38cb9e3b3c.tar.gz
align the order of parameters for urlencode()
In Python 3.3, hash randomization is enabled by default. It causes the iteration order of dicts and sets to be unpredictable and differ across Python runs. In the test case, the fixed expecting string will not match the test result, it is relying on the dict order. This change transforms the input dict to a sequence of two-element list, with fixed order, and update the related expecitng string / fixture in test cases. Partial Implement: blueprint py33-support Change-Id: I6dccde9e584be8335a6375f5fbad5c5cbd7b9b6d
Diffstat (limited to 'ceilometerclient/tests/v2/test_samples.py')
-rw-r--r--ceilometerclient/tests/v2/test_samples.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ceilometerclient/tests/v2/test_samples.py b/ceilometerclient/tests/v2/test_samples.py
index 32084c9..a6eff4f 100644
--- a/ceilometerclient/tests/v2/test_samples.py
+++ b/ceilometerclient/tests/v2/test_samples.py
@@ -35,7 +35,7 @@ del CREATE_SAMPLE['message_id']
del CREATE_SAMPLE['source']
base_url = '/v2/meters/instance'
-args = 'q.op=&q.op=&q.value=foo&q.value=bar&q.field=resource_id&q.field=source'
+args = 'q.field=resource_id&q.field=source&q.op=&q.op=&q.value=foo&q.value=bar'
fixtures = {
base_url:
{