summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/tests/vcpeutils
diff options
context:
space:
mode:
authorumry8364 <morgan.richomme@orange.com>2019-08-28 12:06:30 +0200
committerDR695H <dr695h@att.com>2019-08-28 15:44:21 -0400
commitd4af56d4c2f67a1285da783764f20a0c1c546592 (patch)
tree59e9b8921fe341f36f58168b4365cef2185879a0 /robotframework-onap/tests/vcpeutils
parentf2b75da8dd38077c60cc2c852f73092980c1f906 (diff)
Add tox
it would create virtualenv to - run tests in python2.7 and 3 - perform linting operations (flake8, pylint) Issue-ID: INT-1228 Change-Id: I451e1108285f6ebffc650bf3de4f175594ec796d Signed-off-by: umry8364 <morgan.richomme@orange.com> Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/tests/vcpeutils')
-rw-r--r--robotframework-onap/tests/vcpeutils/SoUtils_test.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/robotframework-onap/tests/vcpeutils/SoUtils_test.py b/robotframework-onap/tests/vcpeutils/SoUtils_test.py
index 22afed6..cce3936 100644
--- a/robotframework-onap/tests/vcpeutils/SoUtils_test.py
+++ b/robotframework-onap/tests/vcpeutils/SoUtils_test.py
@@ -1,14 +1,17 @@
from unittest import TestCase
-from vcpeutils.SoUtils import *
+from vcpeutils.SoUtils import SoUtils
class SoUtilsTest(TestCase):
-
def test(self):
input_dict = dict()
SoUtils.add_related_instance(input_dict, "test", "test2")
results = dict()
results['relatedInstanceList'] = [{"relatedInstance": {"instanceId": "test", "modelInfo": "test2"}}]
- self.assertDictContainsSubset(results, input_dict)
+ self.assertEqual(results, self.extract_dict_a_from_b(results,input_dict))
+
+ @staticmethod
+ def extract_dict_a_from_b(a, b):
+ return dict([(k, b[k]) for k in a.keys() if k in b.keys()])