Exemple #1
0
 def test_valid_private(self):
     form = BaseExternalForkForm({'as_private': u'checked'})
     form.request = self.request
     self.assertTrue(form.is_valid())
     # as_public checked
     self.assertFalse(form.is_public())
     self.assertTrue(form.is_private())
Exemple #2
0
 def test_not_cleaned_with_data(self):
     form = BaseExternalForkForm({'as_private': u'checked'})
     form.request = self.request
     self.assertRaises(ProjectorError, form.is_public)
     self.assertRaises(ProjectorError, form.is_private)
Exemple #3
0
 def test_not_cleaned_no_data(self):
     form = BaseExternalForkForm()
     form.request = self.request
     self.assertRaises(ProjectorError, form.is_public)
     self.assertRaises(ProjectorError, form.is_private)