Slightly change bundle error message

master
Chris Lenk 2019-05-22 11:05:01 -04:00
parent 51b2db4fba
commit a6fa3ff1d7
4 changed files with 4 additions and 4 deletions

View File

@ -332,4 +332,4 @@ def test_bundle_getitem_overload_obj_id_not_found():
with pytest.raises(KeyError) as excinfo:
bundle['non existent']
assert "neither a valid bundle property nor does it match the id property" in str(excinfo.value)
assert "neither a property on the bundle nor does it match the id property" in str(excinfo.value)

View File

@ -306,4 +306,4 @@ def test_bundle_getitem_overload_obj_id_not_found():
with pytest.raises(KeyError) as excinfo:
bundle['non existent']
assert "neither a valid bundle property nor does it match the id property" in str(excinfo.value)
assert "neither a property on the bundle nor does it match the id property" in str(excinfo.value)

View File

@ -52,4 +52,4 @@ class Bundle(_STIXBase):
try:
return self.get_obj(key)
except KeyError:
raise KeyError("'%s' is neither a valid bundle property nor does it match the id property of any of the bundle's objects" % key)
raise KeyError("'%s' is neither a property on the bundle nor does it match the id property of any of the bundle's objects" % key)

View File

@ -50,4 +50,4 @@ class Bundle(_STIXBase):
try:
return self.get_obj(key)
except KeyError:
raise KeyError("'%s' is neither a valid bundle property nor does it match the id property of any of the bundle's objects" % key)
raise KeyError("'%s' is neither a property on the bundle nor does it match the id property of any of the bundle's objects" % key)