Code cleanup in advance of flake8.

Change-Id: Ia2b463fdf3092aa72147eeda41faad4733fddd46
This commit is contained in:
Monty Taylor 2013-05-18 07:11:26 -07:00
parent c305a45892
commit 1a0b7b0a64
5 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ def mock_http_request(resp=None):
{
"region": "RegionOne",
"adminURL": "http://localhost:8774/v1.1",
"internalURL":"http://localhost:8774/v1.1",
"internalURL": "http://localhost:8774/v1.1",
"publicURL": "http://localhost:8774/v1.1/",
},
],

View File

@ -61,5 +61,5 @@ class BaremetalExtensionTest(utils.TestCase):
cs.assert_called('POST', '/os-baremetal-nodes/1/action')
def test_node_list_interfaces(self):
il = cs.baremetal.list_interfaces(1)
cs.baremetal.list_interfaces(1)
cs.assert_called('GET', '/os-baremetal-nodes/1')

View File

@ -36,7 +36,7 @@ class TenantNetworkExtensionTests(utils.TestCase):
self.assertTrue(len(nets) > 0)
def test_get_tenant_network(self):
net = cs.tenant_networks.get(1)
cs.tenant_networks.get(1)
cs.assert_called('GET', '/os-tenant-networks/1')
def test_create_tenant_networks(self):

View File

@ -125,7 +125,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
}
correct_response = json.dumps(dict_correct_response)
dict_responses = [
{"headers": {'location':'http://127.0.0.1:5001'},
{"headers": {'location': 'http://127.0.0.1:5001'},
"status_code": 305,
"text": "Use proxy"},
# Configured on admin port, nova redirects to v2.0 port.

View File

@ -20,7 +20,7 @@ def assert_has_keys(dict, required=[], optional=[]):
for k in required:
assert_in(k, keys, "required key %s missing from %s" % (k, dict))
allowed_keys = set(required) | set(optional)
extra_keys = set(keys).difference(set(required + optional))
extra_keys = set(keys).difference(allowed_keys)
if extra_keys:
fail("found unexpected keys: %s" % list(extra_keys))