Merge "Fix error message"

This commit is contained in:
Jenkins 2017-01-23 09:43:20 +00:00 committed by Gerrit Code Review
commit e79991d92d
2 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ class ResourceAttributeError(IndexerException, AttributeError):
"""Error raised when an attribute does not exist for a resource type."""
def __init__(self, resource, attribute):
super(ResourceAttributeError, self).__init__(
"Resource %s has no %s attribute" % (resource, attribute))
"Resource type %s has no %s attribute" % (resource, attribute))
self.resource = resource,
self.attribute = attribute

View File

@ -1394,7 +1394,7 @@ class ResourceTest(RestTest):
"/v1/search/resource/" + self.resource_type,
params={"=": {"foobar": "baz"}},
status=400)
self.assertIn("Resource " + self.resource_type
self.assertIn("Resource type " + self.resource_type
+ " has no foobar attribute",
result.text)