diff options
author | DR695H <dr695h@att.com> | 2019-05-04 15:51:36 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-05-04 16:33:51 -0400 |
commit | 158df8f73cb2988031cd408939681d3ade443b2f (patch) | |
tree | aaa0faca916a105adef1eb734d3e7dd528cfb7a3 /robotframework-onap/tests/vcpeutils/SoUtils_test.py | |
parent | 8ad85420e45ffeafb536de55b31ad68c0d03c986 (diff) |
fix vcpeutils
removed relative imports and using the preferred method of importing.
use the open instead of file method to get files
use the new pyaml method that specifies the loader
use builtins.basestring for unicode and nonunicode comparison
use the correct method to call the robot framework logger warn
adding in unit tests for things to make sure they work
Change-Id: I15da74ff66988ef2610ada3ae21a1c6104c26c35
Issue-ID: INT-1061
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/tests/vcpeutils/SoUtils_test.py')
-rw-r--r-- | robotframework-onap/tests/vcpeutils/SoUtils_test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/robotframework-onap/tests/vcpeutils/SoUtils_test.py b/robotframework-onap/tests/vcpeutils/SoUtils_test.py new file mode 100644 index 0000000..22afed6 --- /dev/null +++ b/robotframework-onap/tests/vcpeutils/SoUtils_test.py @@ -0,0 +1,14 @@ +from unittest import TestCase + + +from vcpeutils.SoUtils import * + + +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) |