X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/dbb1ae2cf25105f7a3831961b08386a1326baef8..e7c8c7e1fd0fe2eb867b26ae205b75822204a45f:/apps/dictionary/tests.py diff --git a/apps/dictionary/tests.py b/apps/dictionary/tests.py index e88fe507d..526819a01 100755 --- a/apps/dictionary/tests.py +++ b/apps/dictionary/tests.py @@ -23,6 +23,8 @@ class DictionaryTests(WLTestCase): BOOK_TEXT = """ rose --- kind of a flower. + rose --- kind of a flower. + rose (color) --- #FF007F. """ @@ -30,16 +32,21 @@ class DictionaryTests(WLTestCase): self.assertEqual( len(self.client.get('/przypisy/').context['object_list']), - 1, + 2, 'There should be a note on the note list.') self.assertEqual( - len(self.client.get('/przypisy/a/').context['object_list']), + len(self.client.get('/przypisy/?ltr=r').context['object_list']), 0, 'There should not be a note for the letter A.') self.assertEqual( - len(self.client.get('/przypisy/r/').context['object_list']), - 1, + len(self.client.get('/przypisy/?ltr=r').context['object_list']), + 2, + 'There should be a note for the letter R.') + + self.assertEqual( + len(self.client.get('/przypisy/?qual=color').context['object_list']), + 2, 'There should be a note for the letter R.')