minor: additional tests for interaction around node lookup
A recent evaluation of the lookup code yielded an awareness that while we're sort of following the overall community pattern of testing what we expect in terms of patterns and behavior, really needed just a little bit more in the way of testing. While ultimately, these tests are really just exercising front end validation, it is still important to check to have increased assurance of a secure codebase. Change-Id: Iaa917191e0f118f8828161174ea1fe8c55c8f4ee
This commit is contained in:
parent
8086167054
commit
af33d8bd71
@ -94,6 +94,20 @@ class TestLookup(test_api_base.BaseApiTest):
|
||||
expect_errors=True)
|
||||
self.assertEqual(http_client.BAD_REQUEST, response.status_int)
|
||||
|
||||
def test_invalid_input_addresses(self):
|
||||
response = self.get_json(
|
||||
'/lookup?addresses=meow1',
|
||||
headers={api_base.Version.string: str(api_v1.max_version())},
|
||||
expect_errors=True)
|
||||
self.assertEqual(http_client.BAD_REQUEST, response.status_int)
|
||||
|
||||
def test_invalid_input_node_uuid(self):
|
||||
response = self.get_json(
|
||||
'/lookup?node_uuid=meow1',
|
||||
headers={api_base.Version.string: str(api_v1.max_version())},
|
||||
expect_errors=True)
|
||||
self.assertEqual(http_client.BAD_REQUEST, response.status_int)
|
||||
|
||||
def test_not_found(self):
|
||||
response = self.get_json(
|
||||
'/lookup?addresses=%s' % ','.join(self.addresses),
|
||||
|
Loading…
x
Reference in New Issue
Block a user