summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authormaheshgudi2018-10-15 16:08:54 +0530
committerankitjavalkar2019-12-27 10:59:31 +0530
commit3a0acf73017899067b75b23b7df0eac0ab888abf (patch)
tree504554510c94875f6fea582c18670a100302b0bf /yaksh
parent4def423d573beceee07780f21bcd55836d50b558 (diff)
downloadonline_test-3a0acf73017899067b75b23b7df0eac0ab888abf.tar.gz
online_test-3a0acf73017899067b75b23b7df0eac0ab888abf.tar.bz2
online_test-3a0acf73017899067b75b23b7df0eac0ab888abf.zip
Add testcase for highlight spaces
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/templatetags/test_custom_filters.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/yaksh/templatetags/test_custom_filters.py b/yaksh/templatetags/test_custom_filters.py
index eb1f0fb..9816dc8 100644
--- a/yaksh/templatetags/test_custom_filters.py
+++ b/yaksh/templatetags/test_custom_filters.py
@@ -11,7 +11,8 @@ from yaksh.models import (User, Profile, Question, Quiz, QuestionPaper,
from yaksh.templatetags.custom_filters import (completed, inprogress,
get_ordered_testcases,
- get_answer_for_arrange_options
+ get_answer_for_arrange_options,
+ highlight_spaces
)
@@ -148,3 +149,9 @@ class CustomFiltersTestCases(unittest.TestCase):
self.assertSequenceEqual(testcases, ordered_testcases)
new_answerpaper.delete()
+
+ def test_highlight_spaces(self):
+ expected_output = "A "
+ highlighted_output = highlight_spaces(expected_output)
+ self.assertEqual(highlighted_output,
+ 'A<span style="background-color:#ffb6db">&nbsp</span>')