summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/ONAPLibrary/Base64Keywords.py
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-01 13:58:49 -0400
committerDR695H <dr695h@att.com>2019-07-01 13:58:49 -0400
commit205db3c1a955f9e96776019deb2922fd208557a7 (patch)
tree07927a1dd809e65c24ee57b7b86b5fb58fb72c14 /robotframework-onap/ONAPLibrary/Base64Keywords.py
parent96707b207ca00d80e622a0351b4566ebc87ace61 (diff)
adding in new keywords for base64, oof and sniro
Issue-ID: TEST-171 Change-Id: Ib305d17ca4847bf1e5740bd1983ca1f66b75bbd8 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/ONAPLibrary/Base64Keywords.py')
-rw-r--r--robotframework-onap/ONAPLibrary/Base64Keywords.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/robotframework-onap/ONAPLibrary/Base64Keywords.py b/robotframework-onap/ONAPLibrary/Base64Keywords.py
new file mode 100644
index 0000000..a87a4b9
--- /dev/null
+++ b/robotframework-onap/ONAPLibrary/Base64Keywords.py
@@ -0,0 +1,19 @@
+from robot.api.deco import keyword
+import base64
+
+
+class Base64Keywords(object):
+ """ Utilities useful for generating UUIDs """
+
+ def __init__(self):
+ super(Base64Keywords, self).__init__()
+
+ @keyword
+ def base64_encode(self, string_to_encode):
+ """generate a base64 encoded string"""
+ return base64.b64encode(self, string_to_encode)
+
+ @keyword
+ def base64_decode(self, string_to_decode):
+ """decode a base64 encoded string"""
+ return base64.b64decode(self, string_to_decode)