Show More
@@ -76,11 +76,8 b' class PostManager(models.Manager):' | |||||
76 | if tag: |
|
76 | if tag: | |
77 | threads = tag.threads |
|
77 | threads = tag.threads | |
78 |
|
78 | |||
79 | # TODO This needs to be uncommented when 'all tags' view won't |
|
79 | if threads.count() == 0: | |
80 | # use this method to get threads for tag |
|
80 | raise Http404 | |
81 |
|
||||
82 | # if threads.count() == 0: |
|
|||
83 | # raise Http404 |
|
|||
84 | else: |
|
81 | else: | |
85 | threads = self.filter(thread=None) |
|
82 | threads = self.filter(thread=None) | |
86 |
|
83 |
@@ -28,7 +28,7 b' class BoardTests(TestCase):' | |||||
28 | post = self._create_post() |
|
28 | post = self._create_post() | |
29 |
|
29 | |||
30 | self.assertIsNotNone(post) |
|
30 | self.assertIsNotNone(post) | |
31 | self.assertEqual(boards.models.NO_PARENT, post.parent) |
|
31 | self.assertIsNone(post.thread, 'Opening post has a thread') | |
32 |
|
32 | |||
33 | def test_delete_post(self): |
|
33 | def test_delete_post(self): | |
34 | post = self._create_post() |
|
34 | post = self._create_post() | |
@@ -52,7 +52,7 b' class BoardTests(TestCase):' | |||||
52 | opening_post = self._create_post() |
|
52 | opening_post = self._create_post() | |
53 |
|
53 | |||
54 | for i in range(0, 2): |
|
54 | for i in range(0, 2): | |
55 | Post.objects.create_post('title', 'text',thread=opening_post) |
|
55 | Post.objects.create_post('title', 'text', thread=opening_post) | |
56 |
|
56 | |||
57 | thread = Post.objects.get_thread(opening_post.id) |
|
57 | thread = Post.objects.get_thread(opening_post.id) | |
58 |
|
58 |
@@ -337,8 +337,7 b' def _get_user(request):' | |||||
337 |
|
337 | |||
338 | time_now = timezone.now() |
|
338 | time_now = timezone.now() | |
339 | user = User.objects.create(user_id=new_id, rank=RANK_USER, |
|
339 | user = User.objects.create(user_id=new_id, rank=RANK_USER, | |
340 |
registration_time=time_now |
|
340 | registration_time=time_now) | |
341 | last_access_time=time_now) |
|
|||
342 |
|
341 | |||
343 | session['user_id'] = user.id |
|
342 | session['user_id'] = user.id | |
344 | else: |
|
343 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now