Show More
@@ -1,6 +1,7 b'' | |||||
1 | # coding=utf-8 |
|
1 | # coding=utf-8 | |
2 | from django.utils.unittest import TestCase |
|
2 | from django.utils.unittest import TestCase | |
3 | from django.test.client import Client |
|
3 | from django.test.client import Client | |
|
4 | import time | |||
4 |
|
5 | |||
5 | import boards |
|
6 | import boards | |
6 |
|
7 | |||
@@ -112,8 +113,8 b' class BoardTests(TestCase):' | |||||
112 | self.assertEqual(1, Post.objects.count(), msg='The validation passed ' |
|
113 | self.assertEqual(1, Post.objects.count(), msg='The validation passed ' | |
113 | 'where it should fail') |
|
114 | 'where it should fail') | |
114 |
|
115 | |||
115 | # TODO Some workaround and test for the "waiting" validation should |
|
116 | # Wait fot the posting delay or we won't be able to post | |
116 | # exist here |
|
117 | time.sleep(settings.POSTING_DELAY + 1) | |
117 | response = client.post(THREAD_PAGE_ONE, {'text': TEST_TEXT, |
|
118 | response = client.post(THREAD_PAGE_ONE, {'text': TEST_TEXT, | |
118 | 'tags': valid_tags}) |
|
119 | 'tags': valid_tags}) | |
119 | self.assertEqual(HTTP_CODE_REDIRECT, response.status_code, |
|
120 | self.assertEqual(HTTP_CODE_REDIRECT, response.status_code, |
General Comments 0
You need to be logged in to leave comments.
Login now