Show More
@@ -87,7 +87,7 b' class PostManager(models.Manager):' | |||
|
87 | 87 | |
|
88 | 88 | def get_thread(self, opening_post_id): |
|
89 | 89 | try: |
|
90 | opening_post = self.get(id=opening_post_id) | |
|
90 | opening_post = self.get(id=opening_post_id, parent=NO_PARENT) | |
|
91 | 91 | except Post.DoesNotExist: |
|
92 | 92 | raise Http404 |
|
93 | 93 |
@@ -9,6 +9,7 b'' | |||
|
9 | 9 | <link rel="stylesheet" type="text/css" |
|
10 | 10 | href="{{ STATIC_URL }}css/{{ theme }}/base_page.css" media="all"/> |
|
11 | 11 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
12 | <meta charset="utf-8"/> | |
|
12 | 13 | {% block head %}{% endblock %} |
|
13 | 14 | </head> |
|
14 | 15 | <body> |
@@ -207,4 +207,12 b' class BoardTests(TestCase):' | |||
|
207 | 207 | response_not_existing = client.get(TAG_PAGE + u'not_tag' + '/') |
|
208 | 208 | self.assertEqual(HTTP_CODE_NOT_FOUND, |
|
209 | 209 | response_not_existing.status_code, |
|
210 | u'Not existing tag is opened') No newline at end of file | |
|
210 | u'Not existing tag is opened') | |
|
211 | ||
|
212 | reply_id = Post.objects.create_post('', TEST_TEXT, | |
|
213 | parent_id=existing_post_id) | |
|
214 | response_not_existing = client.get(THREAD_PAGE + str( | |
|
215 | reply_id) + '/') | |
|
216 | self.assertEqual(HTTP_CODE_NOT_FOUND, | |
|
217 | response_not_existing.status_code, | |
|
218 | u'Not existing thread is opened') |
General Comments 0
You need to be logged in to leave comments.
Login now