summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
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>')