Esempio 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
Esempio 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()
Esempio 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