Show More
@@ -368,7 +368,7 b' class Post(models.Model, Viewable):' | |||
|
368 | 368 | thread.last_edit_time = timezone.now() |
|
369 | 369 | thread.save() |
|
370 | 370 | |
|
371 |
|
|
|
371 | super(Post, self).delete(using) | |
|
372 | 372 | |
|
373 | 373 | logging.getLogger('boards.post.delete').info( |
|
374 | 374 | 'Deleted post P#{}/{}'.format(self.id, self.get_title())) |
@@ -37,9 +37,12 b' class PostTests(TestCase):' | |||
|
37 | 37 | thread = opening_post.get_thread() |
|
38 | 38 | reply = Post.objects.create_post("", "", thread=thread) |
|
39 | 39 | |
|
40 |
|
|
|
40 | opening_post.delete() | |
|
41 | 41 | |
|
42 |
self.assertFalse(Post.objects.filter(id=reply.id).exists() |
|
|
42 | self.assertFalse(Post.objects.filter(id=reply.id).exists(), | |
|
43 | 'Reply was not deleted with the thread.') | |
|
44 | self.assertFalse(Post.objects.filter(id=opening_post.id).exists(), | |
|
45 | 'Opening post was not deleted with the thread.') | |
|
43 | 46 | |
|
44 | 47 | def test_post_to_thread(self): |
|
45 | 48 | """Test adding post to a thread""" |
General Comments 0
You need to be logged in to leave comments.
Login now