Remove backslash usage from a few tests
Noticed these in the code, figured we should stick to not using backslashes if possible. Change-Id: I55e5402683141e14df7c2b38883b1f3cc2a6bb6a
This commit is contained in:
parent
ddf0c16a10
commit
3bdfef827c
@ -24,9 +24,8 @@ class TestIdentityProvider(identity_fakes.TestFederatedIdentity):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestIdentityProvider, self).setUp()
|
super(TestIdentityProvider, self).setUp()
|
||||||
|
|
||||||
self.identity_providers_mock = self.app.client_manager.\
|
identity_lib = self.app.client_manager.identity
|
||||||
identity.identity_providers
|
self.identity_providers_mock = identity_lib.identity_providers
|
||||||
|
|
||||||
self.identity_providers_mock.reset_mock()
|
self.identity_providers_mock.reset_mock()
|
||||||
|
|
||||||
|
|
||||||
@ -35,17 +34,10 @@ class TestIdentityProviderCreate(TestIdentityProvider):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestIdentityProviderCreate, self).setUp()
|
super(TestIdentityProviderCreate, self).setUp()
|
||||||
|
|
||||||
self.identity_providers_mock.create.return_value = \
|
copied_idp = copy.deepcopy(identity_fakes.IDENTITY_PROVIDER)
|
||||||
fakes.FakeResource(
|
resource = fakes.FakeResource(None, copied_idp, loaded=True)
|
||||||
None,
|
self.identity_providers_mock.create.return_value = resource
|
||||||
copy.deepcopy(identity_fakes.IDENTITY_PROVIDER),
|
self.cmd = identity_provider.CreateIdentityProvider(self.app, None)
|
||||||
loaded=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.cmd = identity_provider.CreateIdentityProvider(
|
|
||||||
self.app,
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_create_identity_provider_no_options(self):
|
def test_create_identity_provider_no_options(self):
|
||||||
arglist = [
|
arglist = [
|
||||||
@ -116,12 +108,9 @@ class TestIdentityProviderCreate(TestIdentityProvider):
|
|||||||
IDENTITY_PROVIDER['enabled'] = False
|
IDENTITY_PROVIDER['enabled'] = False
|
||||||
IDENTITY_PROVIDER['description'] = None
|
IDENTITY_PROVIDER['description'] = None
|
||||||
|
|
||||||
self.identity_providers_mock.create.return_value = \
|
resource = fakes.FakeResource(None, IDENTITY_PROVIDER, loaded=True)
|
||||||
fakes.FakeResource(
|
self.identity_providers_mock.create.return_value = resource
|
||||||
None,
|
|
||||||
IDENTITY_PROVIDER,
|
|
||||||
loaded=True,
|
|
||||||
)
|
|
||||||
arglist = [
|
arglist = [
|
||||||
'--disable',
|
'--disable',
|
||||||
identity_fakes.idp_id,
|
identity_fakes.idp_id,
|
||||||
|
@ -77,13 +77,9 @@ class TestRequestTokenAuthorize(TestOAuth1):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestRequestTokenAuthorize, self).setUp()
|
super(TestRequestTokenAuthorize, self).setUp()
|
||||||
|
|
||||||
self.request_tokens_mock.authorize.return_value = \
|
copied_verifier = copy.deepcopy(identity_fakes.OAUTH_VERIFIER)
|
||||||
fakes.FakeResource(
|
resource = fakes.FakeResource(None, copied_verifier, loaded=True)
|
||||||
None,
|
self.request_tokens_mock.authorize.return_value = resource
|
||||||
copy.deepcopy(identity_fakes.OAUTH_VERIFIER),
|
|
||||||
loaded=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.cmd = token.AuthorizeRequestToken(self.app, None)
|
self.cmd = token.AuthorizeRequestToken(self.app, None)
|
||||||
|
|
||||||
def test_authorize_request_tokens(self):
|
def test_authorize_request_tokens(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user