summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-19 16:55:55 -0400
committerDR695H <dr695h@att.com>2019-07-19 17:50:32 -0400
commit4c8dc6a28644cbd44084296907d54c66b447432e (patch)
tree7d98c75cee99ad3891bebc79847db0d0a1d95ae9 /robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py
parent601ead6cc5e04f276d57d118e1d94d1366278a24 (diff)
fixing is not none
Issue-ID: TEST-174 Change-Id: I1b48d6f6839cdbb4df5eb6461ac1a053fcdfbc57 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py')
-rw-r--r--robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py b/robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py
new file mode 100644
index 0000000..4c63591
--- /dev/null
+++ b/robotframework-onap/tests/ONAPLibrary/Base64KeywordsTests.py
@@ -0,0 +1,16 @@
+import base64
+from unittest import TestCase
+
+from ONAPLibrary.Base64Keywords import Base64Keywords
+
+
+class Base64KeywordsTests(TestCase):
+
+ def test_base64_encode(self):
+ enc = Base64Keywords().base64_encode("string_to_encode")
+ enc_base = base64.b64encode("string_to_encode".encode("utf-8"))
+ self.assertEqual(enc_base, enc)
+
+ def test_base64_decode(self):
+ enc = Base64Keywords().base64_decode('c3RyaW5nX3RvX2RlY29kZQ==')
+ self.assertEqual("string_to_decode", enc.decode("utf-8"))