libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [libcloud] branch trunk updated: Use OrderedDict to ensure stable ordering for tests.
Date Tue, 02 Jul 2019 17:39:26 GMT
This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b2a0d5c  Use OrderedDict to ensure stable ordering for tests.
b2a0d5c is described below

commit b2a0d5c5ac9238ddf1fa5a36a314e6f27ec5a1de
Author: Tomaz Muraus <tomaz@tomaz.me>
AuthorDate: Tue Jul 2 19:37:56 2019 +0200

    Use OrderedDict to ensure stable ordering for tests.
---
 libcloud/test/compute/test_ec2.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 4049155..e42575b 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -15,6 +15,8 @@
 
 from __future__ import with_statement
 
+from collections import OrderedDict
+
 import os
 import sys
 from datetime import datetime
@@ -1113,8 +1115,11 @@ class EC2Tests(LibcloudTestCase, TestCaseMixin):
 
     def test_ex_list_networks_filters(self):
         EC2MockHttp.type = 'filters'
-        filters = {'dhcp-options-id': 'dopt-7eded312',  # matches two networks
-                   'cidr': '192.168.51.0/24'}  # matches one network
+
+        filters = OrderedDict([
+            ('dhcp-options-id', 'dopt-7eded312'),  # matches two networks
+            ('cidr', '192.168.51.0/24')  # matches two networks
+        ])
 
         # We assert in the mock http method
         self.driver.ex_list_networks(filters=filters)


Mime
View raw message