def test_email(self, email, outcome, min_user): min_user['email'] = email assert is_valid(min_user) == outcome
def test_mandatory_fields_empty(self, field, min_user): min_user[field] = '' assert not is_valid(min_user)
def test_name_whitespace_only(self, min_user): min_user['name'] = ' \n\t' assert not is_valid(min_user)
def test_valid_age(self, age, min_user): min_user['age'] = age assert is_valid(min_user)
def test_mandatory_fields(self, field, min_user): del min_user[field] assert not is_valid(min_user)
def test_invalid_age_wrong_type(self, age, min_user): min_user['age'] = age assert not is_valid(min_user)
def test_invalid_age_too_old(self, age, min_user): min_user['age'] = age assert not is_valid(min_user)
def test_full(self, full_user): assert is_valid(full_user)
def test_minimal(self, min_user): assert is_valid(min_user)
def test_invalid_types(self, field, value, min_user): min_user[field] = value assert not is_valid(min_user)