Ignore oder in unit test of test_get_conf.py 59/38759/2
authorAlex Yang <yangyang1@zte.com.cn>
Fri, 4 Aug 2017 09:23:23 +0000 (17:23 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Fri, 4 Aug 2017 09:27:26 +0000 (17:27 +0800)
Since the result contains a list, so ignore_order should be True
in the comparison.

Change-Id: Iff4c655312015a55a69b91692ab6f9696715a143
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
tests/unit/test_get_conf.py

index 10b040a..f882d9d 100644 (file)
@@ -9,7 +9,6 @@
 
 import os
 import pytest
-
 from deepdiff import DeepDiff
 
 from deploy.get_conf import (
@@ -64,4 +63,4 @@ def test_config(deploy_file, network_file):
               '10.20.11.11', '/dev/sdb',
               {'controller01': [], 'controller02': [], 'controller03': [],
                'computer01': [], 'computer02': []})
-    assert DeepDiff(result, expect) == {}
+    assert DeepDiff(result, expect, ignore_order=True) == {}