Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 def test_id_cannot_be_empty(self):
     organization_id = ''
     organization = OrganizationBuilder().with_id(organization_id).build()
     with self.assertRaises(exceptions.ValidationError):
         organization.full_clean()
Exemplo n.º 3
0
 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()
Exemplo n.º 4
0
 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()