Beispiel #1
0
    def test_invalid_form_post_empty_text(self):
        data = {
            'text': ' '
        }

        form = PrivatePostForm(self.topic, data=data)
        self.assertFalse(form.is_valid())
Beispiel #2
0
    def test_valid_form_post(self):
        data = {
            'text': 'blabla'
        }

        form = PrivatePostForm(self.topic, data=data)
        self.assertTrue(form.is_valid())
Beispiel #3
0
    def test_invalid_form_post_empty_text(self):
        data = {
            'text': ' '
        }

        form = PrivatePostForm(self.topic, data=data)
        self.assertFalse(form.is_valid())
Beispiel #4
0
    def test_valid_form_post(self):
        data = {
            'text': 'blabla'
        }

        form = PrivatePostForm(self.topic, data=data)
        self.assertTrue(form.is_valid())
Beispiel #5
0
 def test_invalid_form_post_no_text(self):
     form = PrivatePostForm(self.topic, data={})
     self.assertFalse(form.is_valid())
Beispiel #6
0
 def test_invalid_form_post_no_text(self):
     form = PrivatePostForm(self.topic, data={})
     self.assertFalse(form.is_valid())