pep8 cleanups after the rebase
This commit is contained in:
parent
39291fe0e8
commit
2d785404ed
@ -12,9 +12,11 @@ from tests import utils
|
||||
class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
def test_authenticate_success(self):
|
||||
cs = client.Client("username", "apikey", "project_id", "auth_url/v2.0")
|
||||
resp = {"auth": {"token": {"expires": "12345", "id": "FAKE_ID"},
|
||||
resp = {"auth":
|
||||
{"token": {"expires": "12345", "id": "FAKE_ID"},
|
||||
"serviceCatalog": {
|
||||
"nova": [{"adminURL": "http://localhost:8774/v1.1",
|
||||
"nova": [
|
||||
{"adminURL": "http://localhost:8774/v1.1",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "http://localhost:8774/v1.1",
|
||||
"publicURL": "http://localhost:8774/v1.1/"}]}}}
|
||||
@ -23,7 +25,8 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
"body": json.dumps(resp),
|
||||
})
|
||||
|
||||
mock_request = mock.Mock(return_value=(auth_response, json.dumps(resp)))
|
||||
mock_request = mock.Mock(return_value=(auth_response,
|
||||
json.dumps(resp)))
|
||||
|
||||
@mock.patch.object(httplib2.Http, "request", mock_request)
|
||||
def test_auth_call():
|
||||
@ -45,7 +48,6 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
|
||||
test_auth_call()
|
||||
|
||||
|
||||
def test_authenticate_failure(self):
|
||||
cs = client.Client("username", "apikey", "project_id", "auth_url/v2.0")
|
||||
resp = {"unauthorized": {"message": "Unauthorized", "code": "401"}}
|
||||
@ -54,7 +56,8 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
"body": json.dumps(resp),
|
||||
})
|
||||
|
||||
mock_request = mock.Mock(return_value=(auth_response, json.dumps(resp)))
|
||||
mock_request = mock.Mock(return_value=(auth_response,
|
||||
json.dumps(resp)))
|
||||
|
||||
@mock.patch.object(httplib2.Http, "request", mock_request)
|
||||
def test_auth_call():
|
||||
|
Loading…
x
Reference in New Issue
Block a user