You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2019/07/02 17:39:26 UTC

[libcloud] branch trunk updated: Use OrderedDict to ensure stable ordering for tests.

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 <to...@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)