'Representation of EnumValue should be meaningful.'

def test_repr(self):

    for (enumtype, params) in self.valid_values.items():
        for (i, key) in enumerate(params['keys']):
            instance = params['values'][key]
            repr_str = repr(instance)
            self.failUnless(repr_str.startswith('EnumValue('))
            self.failUnless(repr_str.count(repr(enumtype)))
            self.failUnless(repr_str.count(repr(i)))
            self.failUnless(repr_str.count(repr(key)))
            self.failUnless(repr_str.endswith(')'))
