##// END OF EJS Templates
Removed spaceless mode from thread. Removed obsolete space from the post title
Removed spaceless mode from thread. Removed obsolete space from the post title

File last commit:

r888:50a8d25c default
r904:00031b0b default
Show More
test_parser.py
19 lines | 655 B | text/x-python | PythonLexer
from django.test import TestCase
from boards.models import Post
class ParserTest(TestCase):
def test_preparse_quote(self):
raw_text = '>quote\nQuote in >line\nLine\n>Quote'
preparsed_text = Post.objects._preparse_text(raw_text)
self.assertEqual(
'[quote]quote[/quote]\nQuote in >line\nLine\n[quote]Quote[/quote]',
preparsed_text, 'Quote not preparsed.')
def test_preparse_comment(self):
raw_text = '//comment'
preparsed_text = Post.objects._preparse_text(raw_text)
self.assertEqual('[comment]comment[/comment]', preparsed_text,
'Comment not preparsed.')