Fix the test_enum test (the error message now contains the attribute name

This commit is contained in:
Christophe de Vienne
2012-01-18 18:57:34 +01:00
parent eb49f823ad
commit 09d94eb01a

View File

@@ -160,7 +160,8 @@ class TestTypes(unittest.TestCase):
obj.a = 'v3'
assert False, 'ValueError was not raised'
except ValueError, e:
assert str(e) == "Value 'v3' is invalid (should be one of: v1, v2)"
assert str(e) == \
"a: Value 'v3' is invalid (should be one of: v1, v2)", e
def test_attribute_validation(self):
class AType(object):