aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/tests/common/help_functions.py
diff options
context:
space:
mode:
authorMiguel Victoria Villaquiran <miguelvicvil@gmail.com>2021-01-05 22:17:26 +0100
committerGitHub <noreply@github.com>2021-01-05 22:17:26 +0100
commit18068d76ca304a55dffdb4fb54c674bb1dcc148f (patch)
treefe7c96aeda541df84748d52d3d6ff929c992e379 /ihatemoney/tests/common/help_functions.py
parente0bc285c92d42dc2318fd543779665f6a73aad2d (diff)
downloadihatemoney-mirror-18068d76ca304a55dffdb4fb54c674bb1dcc148f.zip
ihatemoney-mirror-18068d76ca304a55dffdb4fb54c674bb1dcc148f.tar.gz
ihatemoney-mirror-18068d76ca304a55dffdb4fb54c674bb1dcc148f.tar.bz2
Simplify tests (#685)
Fix #501
Diffstat (limited to 'ihatemoney/tests/common/help_functions.py')
-rw-r--r--ihatemoney/tests/common/help_functions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ihatemoney/tests/common/help_functions.py b/ihatemoney/tests/common/help_functions.py
new file mode 100644
index 0000000..e9c4dcd
--- /dev/null
+++ b/ihatemoney/tests/common/help_functions.py
@@ -0,0 +1,5 @@
+def em_surround(string, regex_escape=False):
+ if regex_escape:
+ return r'<em class="font-italic">%s<\/em>' % string
+ else:
+ return '<em class="font-italic">%s</em>' % string