##// END OF EJS Templates
Fixed validation test with enabled captcha.
neko259 -
r102:2032ea58 default
parent child Browse files
Show More
@@ -144,6 +144,10 b' class BoardTests(TestCase):'
144 def test_post_validation(self):
144 def test_post_validation(self):
145 """Test the validation of the post form"""
145 """Test the validation of the post form"""
146
146
147 # Disable captcha for the test
148 captcha_enabled = settings.ENABLE_CAPTCHA
149 settings.ENABLE_CAPTCHA = False
150
147 Post.objects.all().delete()
151 Post.objects.all().delete()
148
152
149 client = Client()
153 client = Client()
@@ -175,6 +179,9 b' class BoardTests(TestCase):'
175 self.assertEqual(2, Post.objects.count(),
179 self.assertEqual(2, Post.objects.count(),
176 msg=u'No posts were created')
180 msg=u'No posts were created')
177
181
182 # Restore captcha setting
183 settings.ENABLE_CAPTCHA = captcha_enabled
184
178 def test_404(self):
185 def test_404(self):
179 """Test receiving error 404 when opening a non-existent page"""
186 """Test receiving error 404 when opening a non-existent page"""
180
187
General Comments 0
You need to be logged in to leave comments. Login now