diff options
Diffstat (limited to 'tests/optf-cmso/cmso/attlibs')
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/CurlLibrary.py | 13 | ||||
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/HTTPUtils.py | 21 | ||||
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/JSONUtils.py | 37 | ||||
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/OSUtils.py | 14 | ||||
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/RequestsClientCert.py | 7 | ||||
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/StringTemplater.py | 8 | ||||
-rw-r--r-- | tests/optf-cmso/cmso/attlibs/UID.py | 8 |
7 files changed, 0 insertions, 108 deletions
diff --git a/tests/optf-cmso/cmso/attlibs/CurlLibrary.py b/tests/optf-cmso/cmso/attlibs/CurlLibrary.py deleted file mode 100644 index 44c62293..00000000 --- a/tests/optf-cmso/cmso/attlibs/CurlLibrary.py +++ /dev/null @@ -1,13 +0,0 @@ -from curl import Curl - -class CurlLibrary: - - - def get_zip(self, url, filename): - fp = open(filename, "wb") - c = Curl() - c.get(url, ) - c.set_option(c.WRITEDATA, fp) - c.perform() - c.close() - fp.close()
\ No newline at end of file diff --git a/tests/optf-cmso/cmso/attlibs/HTTPUtils.py b/tests/optf-cmso/cmso/attlibs/HTTPUtils.py deleted file mode 100644 index f9d380c9..00000000 --- a/tests/optf-cmso/cmso/attlibs/HTTPUtils.py +++ /dev/null @@ -1,21 +0,0 @@ -import urllib -from selenium import webdriver -import base64 - -class HTTPUtils: - """HTTPUtils is common resource for simple http helper keywords.""" - - def url_encode_string(self, barestring): - """URL Encode String takes in a string and converts into 'percent-encoded' string""" - return urllib.quote_plus(barestring) - - def ff_profile(self): - fp =webdriver.FirefoxProfile() - fp.set_preference("dom.max_script_run_time",120) - fp.update_preferences() - return fp.path - - def b64_encode(self, instring): - "" - return base64.b64encode(instring) - diff --git a/tests/optf-cmso/cmso/attlibs/JSONUtils.py b/tests/optf-cmso/cmso/attlibs/JSONUtils.py deleted file mode 100644 index 5df1e5c7..00000000 --- a/tests/optf-cmso/cmso/attlibs/JSONUtils.py +++ /dev/null @@ -1,37 +0,0 @@ -import json - -from deepdiff import DeepDiff - -class JSONUtils: - """JSONUtils is common resource for simple json helper keywords.""" - - def json_equals(self, left, right): - """JSON Equals takes in two strings or json objects, converts them into json if needed and then compares them, returning if they are equal or not.""" - if isinstance(left, basestring): - left_json = json.loads(left); - else: - left_json = left; - if isinstance(right, basestring): - right_json = json.loads(right); - else: - right_json = right; - - ddiff = DeepDiff(left_json, right_json, ignore_order=True); - if ddiff == {}: - return True; - else: - return False; - - def json_escape(self, jsonObject): - jsonstr = json.dumps(jsonObject) - outstr = jsonstr.replace('"', '\\"').replace('\n', '\\n') - return outstr - - def make_list_into_dict(self, listOfDicts, key): - """ Converts a list of dicts that contains a field that has a unique key into a dict of dicts """ - d = {} - if isinstance(listOfDicts, list): - for thisDict in listOfDicts: - v = thisDict[key] - d[v] = thisDict - return d
\ No newline at end of file diff --git a/tests/optf-cmso/cmso/attlibs/OSUtils.py b/tests/optf-cmso/cmso/attlibs/OSUtils.py deleted file mode 100644 index 78968f03..00000000 --- a/tests/optf-cmso/cmso/attlibs/OSUtils.py +++ /dev/null @@ -1,14 +0,0 @@ -from sys import platform - -class OSUtils: - """ Utilities useful for constructing OpenStack HEAT requests """ - - def get_normalized_os(self): - os = platform - if platform == "linux" or platform == "linux2": - os = 'linux64' - elif platform == "darwin": - os = 'mac64' - elif platform == "win32": - os = platform - return os diff --git a/tests/optf-cmso/cmso/attlibs/RequestsClientCert.py b/tests/optf-cmso/cmso/attlibs/RequestsClientCert.py deleted file mode 100644 index e1fd66ff..00000000 --- a/tests/optf-cmso/cmso/attlibs/RequestsClientCert.py +++ /dev/null @@ -1,7 +0,0 @@ - -class RequestsClientCert: - """RequestsClientCert allows adding a client cert to the Requests Robot Library.""" - - def add_client_cert(self, session, cert): - """Add Client Cert takes in a requests session object and a string path to the cert""" - session.cert = cert
\ No newline at end of file diff --git a/tests/optf-cmso/cmso/attlibs/StringTemplater.py b/tests/optf-cmso/cmso/attlibs/StringTemplater.py deleted file mode 100644 index 680600fd..00000000 --- a/tests/optf-cmso/cmso/attlibs/StringTemplater.py +++ /dev/null @@ -1,8 +0,0 @@ -from string import Template - -class StringTemplater: - """StringTemplater is common resource for templating with strings.""" - - def template_string(self, template, values): - """Template String takes in a string and its values and converts it using the string.Template class""" - return Template(template).substitute(values)
\ No newline at end of file diff --git a/tests/optf-cmso/cmso/attlibs/UID.py b/tests/optf-cmso/cmso/attlibs/UID.py deleted file mode 100644 index 43748096..00000000 --- a/tests/optf-cmso/cmso/attlibs/UID.py +++ /dev/null @@ -1,8 +0,0 @@ -import uuid - -class UID: - """UUID is a simple library that generates a uuid""" - - def generate_UUID(self): - """generate a uuid""" - return uuid.uuid4()
\ No newline at end of file |