def test_init(self): """Check for error during __init__.""" with self.assertRaises(ValueError) as ve: Restriction.OneCut('bla-me', (Restriction.RestrictionType, ), dict()) self.assertIn('hyphen', str(ve.exception))
def test_init(self): """Check for error during __init__.""" with self.assertRaises(ValueError) as ve: Restriction.OneCut("bla-me", (Restriction.RestrictionType, ), {}) self.assertIn("hyphen", str(ve.exception))