def test_id_cannot_contain_space(self): location_id = 'the id' location = LocationBuilder( self.organization).with_id(location_id).build() with self.assertRaises(exceptions.ValidationError): location.full_clean()
def test_cannot_be_empty(self): name = '' location = LocationBuilder(self.organization).with_name(name).build() with self.assertRaises(exceptions.ValidationError): location.full_clean()
def test_id_cannot_be_none(self): null_id = None location = LocationBuilder(self.organization).with_id(null_id).build() with self.assertRaises(exceptions.ValidationError): location.full_clean()