##// END OF EJS Templates
Added admin loing possibility. Now it is abailable under {BASE_URL}/boards/login...
Added admin loing possibility. Now it is abailable under {BASE_URL}/boards/login Added base css and html resources

File last commit:

r8:b62ef70f default
r9:f67fe28f default
Show More
tests.py
33 lines | 785 B | text/x-python | PythonLexer
from django.test import TestCase
import boards
from boards.models import Post
class BoardTests(TestCase):
def create_post(self):
return Post.objects.create_post(title = 'title',
text = 'text')
def test_post_add(self):
post = self.create_post()
self.assertIsNotNone(post)
self.assertEqual(boards.models.NO_PARENT, post.parent)
def test_delete_post(self):
post = self.create_post()
post_id = post.id
Post.objects.delete_post(post)
self.assertTrue(Post.objects.exists(post_id))
def test_delete_posts_by_ip(self):
post = self.create_post()
post_id = post.id
Post.objects.delete_posts_by_ip('0.0.0.0')
self.assertTrue(Post.objects.exists(post_id))