Ejemplo n.º 1
0
 def test_invalid_slug(self):
     p = Project(group=self.group, slug='foo/bar')
     with self.assertRaises(ValidationError):
         p.full_clean()
     p.slug = 'foo-bar'
     p.full_clean()  # it this raises no exception, then we are fine
Ejemplo n.º 2
0
 def test_validate_project_settings(self):
     p = Project(group=self.group, slug='foobar', project_settings='1')
     with self.assertRaises(ValidationError):
         p.full_clean()
     p.project_settings = 'foo: bar\n'
     p.full_clean()
Ejemplo n.º 3
0
 def test_invalid_slug(self):
     p = Project(group=self.group, slug='foo/bar')
     with self.assertRaises(ValidationError):
         p.full_clean()
     p.slug = 'foo-bar'
     p.full_clean()  # it this raises no exception, then we are fine