Commit bda8408d authored by Jeff Thiessen's avatar Jeff Thiessen

re-added close as a classmethod

parent 9c98ba18
Pipeline #7526 failed with stage
in 5 minutes and 59 seconds
......@@ -68,6 +68,14 @@ class ApiCalls(object):
return ApiCalls._instance
@classmethod
def close():
"""
Close the current session by setting the current instance to None so
the next call with re-initialize the session
"""
ApiCalls._instance = None
def parameters_are_different(self, client_id, client_secret, base_URL, username, password, max_wait_time):
"""
Compare the current instance variables with a new set of variables
......
......@@ -29,7 +29,7 @@ class TestApiCalls(unittest.TestCase):
print "\nResetting api"
# Sets api params to "reset" so a new instance is created when the test
# initializes the api with the parameters it needs for the test
API.apiCalls.ApiCalls._instance = None
API.apiCalls.ApiCalls.close()
@patch("API.apiCalls.urlopen")
@patch("API.apiCalls.ApiCalls.create_session")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment