def test_validate_email_valid(self): errors = defaultdict(list) validate_email(('contact', 0, 'email'), TEST_DATA_FLATTENED, errors, None) assert len(errors) == 0
def test_validate_email_invalid_2(self): errors = defaultdict(list) dada = copy.deepcopy(TEST_DATA_FLATTENED) dada[('contact', 0, 'email')] = u'a.b@com' validate_email(('contact', 0, 'email'), dada, errors, None) assert len(errors) == 1