def test_website_must_be_valid(self): invalid_website = 'not a valid website address' organization = OrganizationBuilder().with_website( invalid_website).build() with self.assertRaises(exceptions.ValidationError): organization.full_clean()
def test_id_cannot_be_empty(self): organization_id = '' organization = OrganizationBuilder().with_id(organization_id).build() with self.assertRaises(exceptions.ValidationError): organization.full_clean()
def test_id_cannot_contain_space(self): organization_id = 'the id' organization = OrganizationBuilder().with_id(organization_id).build() with self.assertRaises(exceptions.ValidationError): organization.full_clean()
def test_email_must_be_valid(self): email = 'not a valid email address' organization = OrganizationBuilder().with_email(email).build() with self.assertRaises(exceptions.ValidationError): organization.full_clean()