Show More
@@ -112,8 +112,8 b' class PostManager(models.Manager):' | |||
|
112 | 112 | Thread.objects.process_oldest_threads() |
|
113 | 113 | self.connect_replies(post) |
|
114 | 114 | |
|
115 |
logger.info('Created post #%d with title %s |
|
|
116 |
% (post.id, post.get_title() |
|
|
115 | logger.info('Created post #%d with title %s' | |
|
116 | % (post.id, post.get_title())) | |
|
117 | 117 | |
|
118 | 118 | return post |
|
119 | 119 |
@@ -25,12 +25,8 b' class KeyTest(TestCase):' | |||
|
25 | 25 | def test_primary_constraint(self): |
|
26 | 26 | KeyPair.objects.generate_key(key_type='ecdsa', primary=True) |
|
27 | 27 | |
|
28 | try: | |
|
28 | with self.assertRaises(Exception): | |
|
29 | 29 | KeyPair.objects.generate_key(key_type='ecdsa', primary=True) |
|
30 | self.fail('Exception should be thrown indicating there can be only' | |
|
31 | ' one primary key.') | |
|
32 | except Exception: | |
|
33 | pass | |
|
34 | 30 | |
|
35 | 31 | def test_model_id_save(self): |
|
36 | 32 | model_id = GlobalId(key_type='test', key='test key', local_id='1') |
@@ -52,10 +48,12 b' class KeyTest(TestCase):' | |||
|
52 | 48 | def test_response_get(self): |
|
53 | 49 | post = self._create_post_with_key() |
|
54 | 50 | reply_post = Post.objects.create_post(title='test_title', |
|
55 |
text='[post]%d[/post]' % post.id, |
|
|
51 | text='[post]%d[/post]' % post.id, | |
|
52 | thread=post.get_thread()) | |
|
56 | 53 | reply_reply_post = Post.objects.create_post(title='', |
|
57 | text='[post]%d[/post]' % reply_post.id, | |
|
58 | thread=post.get_thread()) | |
|
54 | text='[post]%d[/post]' | |
|
55 | % reply_post.id, | |
|
56 | thread=post.get_thread()) | |
|
59 | 57 | |
|
60 | 58 | response = Post.objects.generate_response_get([reply_post]) |
|
61 | 59 | logger.debug(response) |
General Comments 0
You need to be logged in to leave comments.
Login now