diff --git a/tests/test_pagure_flask_api_user.py b/tests/test_pagure_flask_api_user.py
index 37a5091..e93d5b5 100644
--- a/tests/test_pagure_flask_api_user.py
+++ b/tests/test_pagure_flask_api_user.py
@@ -351,7 +351,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
"date": date,
"date_created": "1477558752",
"type": "pull-request",
- "description_mk": '
pingou created PR test#1
',
+ "description_mk": '',
"id": 1,
"ref_id": "1",
"type": "created",
@@ -361,7 +361,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
"date": date,
"date_created": "1477558752",
"type": "pull-request",
- "description_mk": 'pingou commented on PR test#1
',
+ "description_mk": '',
"id": 2,
"ref_id": "1",
"type": "commented",
@@ -371,7 +371,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
"date": date,
"date_created": "1477558752",
"type": "pull-request",
- "description_mk": 'pingou closed PR test#1
',
+ "description_mk": '',
"id": 3,
"ref_id": "1",
"type": "closed",
@@ -381,7 +381,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
"date": date,
"date_created": "1477558752",
"type": "pull-request",
- "description_mk": 'pingou commented on PR test#1
',
+ "description_mk": '',
"id": 4,
"ref_id": "1",
"type": "commented",
@@ -427,7 +427,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
data = json.loads(output.get_data(as_text=True))
exp = {
"activities": [
- {"description_mk": "pingou committed on test#githash
"}
+ {"description_mk": 'pingou committed on test#githash
'}
],
"date": date,
}
@@ -532,7 +532,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
data = json.loads(output.get_data(as_text=True))
exp = {
"activities": [
- {"description_mk": "pingou committed on test#githash
"}
+ {"description_mk": 'pingou committed on test#githash
'}
],
"date": utcdate,
}
@@ -641,7 +641,7 @@ class PagureFlaskApiUSertests(tests.Modeltests):
data = json.loads(output.get_data(as_text=True))
exp = {
"activities": [
- {"description_mk": "pingou committed on test#githash
"}
+ {"description_mk": 'pingou committed on test#githash
'}
],
"date": utcdate,
}
diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py
index 793245d..37f16d5 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -910,8 +910,8 @@ class PagureFlaskApptests(tests.Modeltests):
)
self.assertIn(
"""
- project-1
-Prõjéctö #1
+
""",
output_text,
)
@@ -931,8 +931,8 @@ class PagureFlaskApptests(tests.Modeltests):
)
self.assertIn(
"""
- project-2
-Мой первый суперский репозиторий
+ project-2
+
Мой первый суперский репозиторий
""",
output_text,
)
@@ -1345,11 +1345,11 @@ class PagureFlaskApptests(tests.Modeltests):
data["csrf_token"] = csrf_token
output = self.app.post("/markdown/", data=data)
self.assertEqual(output.status_code, 200)
- exp = """test
+ exp = """"""
self.assertEqual(output.get_data(as_text=True), exp)
tests.create_projects(self.session)
@@ -1362,22 +1362,22 @@ class PagureFlaskApptests(tests.Modeltests):
]
expected = [
# 'pingou committed on test#9364354a4555ba17aa60f0dc844d70b74eb1aecd',
- 'pingou committed on pingou committed on test#9364354a4555ba17aa60f0dc844d70b74eb1aecd
",
+ ">test#9364354a4555ba17aa60f0dc844d70b74eb1aecd
",
# 'Cf commit 936435',
- "Cf commit 936435
",
+ '',
# 'Cf commit 9364354',
#'Cf commit 9364354
',
- 'Cf commit 9364354
',
+ '',
# 'Cf commit 9364354a',
- 'Cf commit 9364354
',
+ '',
# 'Cf commit 9364354a4555ba17aa60f0dc844d70b74eb1aecd',
- 'Cf commit Cf commit 9364354
",
+ ">9364354
",
]
with self.app.application.app_context():
@@ -1406,7 +1406,7 @@ class PagureFlaskApptests(tests.Modeltests):
tests.create_projects(self.session)
tests.create_projects_git(os.path.join(self.path, "repos"), bare=True)
text = "Cf commit 9364354a4555ba17aa60f0d"
- exp = "Cf commit 9364354a4555ba17aa60f0d
"
+ exp = 'Cf commit 9364354a4555ba17aa60f0d
'
with self.app.application.app_context():
data = {"content": text, "csrf_token": csrf_token}
@@ -1439,8 +1439,8 @@ class PagureFlaskApptests(tests.Modeltests):
text = "Cf commit %s" % first_commit.oid.hex
exp = (
- 'Cf commit {1}'
- "
".format(first_commit.oid.hex, first_commit.oid.hex[:7])
+ '".format(first_commit.oid.hex, first_commit.oid.hex[:7])
)
with self.app.application.app_context():
diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py
index f63b964..0220f4d 100644
--- a/tests/test_pagure_flask_ui_issues.py
+++ b/tests/test_pagure_flask_ui_issues.py
@@ -2119,11 +2119,11 @@ class PagureFlaskIssuestests(tests.Modeltests):
# FIXME: There is likely something going wrong in the html
# below
self.assertIn(
- '',
output.get_data(as_text=True),
)
@@ -4680,8 +4680,8 @@ class PagureFlaskIssuestests(tests.Modeltests):
self.assertEqual(output.status_code, 200)
self.assertIn(
''
- 'foo bar #1 see?
',
+ '',
output.get_data(as_text=True),
)
diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py
index d999089..790d234 100644
--- a/tests/test_pagure_lib.py
+++ b/tests/test_pagure_lib.py
@@ -4244,93 +4244,93 @@ class PagureLibtests(tests.Modeltests):
]
expected = [
# 'foo bar test#1 see?',
- 'foo bar test#1 see?
',
+ '',
# 'foo bar pingou/test#2 I mean, really', -- unknown namespace
- "foo bar pingou/test#2 I mean, really
",
+ 'foo bar pingou/test#2 I mean, really
',
# 'foo bar fork/pingou/test#2 bouza!',
- 'foo bar foo bar '
- "pingou/test#2 bouza!
",
+ "pingou/test#2 bouza!
",
# 'foo bar forks/pingou/test#2 bouza!', -- the 's' doesn't matter
- 'foo bar foo bar '
- "pingou/test#2 bouza!
",
+ "pingou/test#2 bouza!
",
# 'foo bar ns/test3#4 bouza!',
- 'foo bar ns/test3#4 bouza!
',
+ '',
# 'foo bar fork/user/ns/test#5 bouza!', -- unknown fork
- "foo bar user/ns/test#5 bouza!
",
+ 'foo bar user/ns/test#5 bouza!
',
# 'foo bar fork/pingou/ns/test#7 bouza!',
- 'foo bar foo bar '
- "pingou/ns/test#7 bouza!
",
+ "pingou/ns/test#7 bouza!
",
# 'test#1 bazinga!',
- 'test#1 bazinga!
',
+ '',
# 'pingou opened the PR forks/pingou/test#2'
- 'pingou opened the PR pingou opened the PR pingou/test#2
',
+ 'title="[Open] test pull-request in fork">pingou/test#2
',
# 'fork/pingou/ns/test#8 is private',
- 'pingou/ns/test#8 is private
',
+ '',
# 'implicit link to #1',
- 'implicit link to #1
',
+ '',
# 'implicit link .#1. with non-whitespace, non-word characters',
- 'implicit link .#1. with non-whitespace, non-word characters
',
+ 'implicit link .#1. with non-whitespace, non-word characters
',
# '#2 - implicit link at start of line',
- '#2 - implicit link at start of line
',
+ '#2 - implicit link at start of line
',
# '#2. implicit link at start of line with no whitespace after',
- '#2. implicit link at start of line with no whitespace after
',
+ '#2. implicit link at start of line with no whitespace after
',
# '#regular header',
- "regular header
",
+ 'regular header
',
# '#34 looks like an implicit link, but no issue 34',
- "34 looks like an implicit link, but no issue 34
",
+ '34 looks like an implicit link, but no issue 34
',
# 'pingou committed on test#9364354a4555ba17aa60f0dc844d70b74eb1aecd',
- 'pingou committed on pingou committed on test#9364354a4555ba17aa60f0dc844d70b74eb1aecd
",
+ ">test#9364354a4555ba17aa60f0dc844d70b74eb1aecd
",
# 'irc://pagure.io'
- 'irc://pagure.io
',
+ '',
# 'ircs://pagure.io' - This is getting cleaned by python-bleach
# and the version 1.4.3 that we have won't let us adjust the
# list of supported protocols
# 'ircs://pagure.io
',
- 'ircs://pagure.io
'
+ ''
if tuple(bleach_v) >= (1, 5, 0)
- else "ircs://pagure.io
",
+ else '',
# 'http://pagure.io'
- 'http://pagure.io
',
+ '',
# 'https://pagure.io'
- 'https://pagure.io
',
+ '',
# ''
- 'https://pagure.io/pagure'
- "
",
+ '",
# '~~foo~~'
- "foo
",
+ '',
# '~~foo bar~~'
- "foo bar
",
+ '',
# '~~[BZ#1435310](https://bugzilla.redhat.com/1435310)~~'
- ''
- "BZ#1435310
",
+ '",
# '~~[BZ#1435310](https://bugzilla.redhat.com/1435310) avc
# denial during F26AH boot 'error_name=org.freedesktop.systemd1
# .NoSuchDynamicUser~~'
- ''
+ ''
"BZ#1435310 avc denial during F26AH boot 'error_name="
- "org.freedesktop.systemd1.NoSuchDynamicUser'
",
+ "org.freedesktop.systemd1.NoSuchDynamicUser'
",
# '``~~foo bar~~``'
- "~~foo bar~~
",
+ '',
# '~~foo bar~~ and ~~another ~~',
- "foo bar and another
",
+ '',
# 'lets mention @pingou',
- 'lets mention @pingou
',
+ '',
# '@pingou at start of line',
- '@pingou at start of line
',
+ '',
# 'but not someone@pingou.com',
- "but not someone@pingou.com
",
+ 'but not someone@pingou.com
',
]
if old_markdown:
@@ -4338,26 +4338,26 @@ class PagureLibtests(tests.Modeltests):
# '[![Fedora_infinity_small.png]'
# '(/test/issue/raw/Fedora_infinity_small.png)]'
# '(/test/issue/raw/Fedora_infinity_small.png)',
- ''
+ '"
)
else:
expected.append(
# '[![Fedora_infinity_small.png]'
# '(/test/issue/raw/Fedora_infinity_small.png)]'
# '(/test/issue/raw/Fedora_infinity_small.png)',
- ''
+ '"
)
with self.app.application.app_context():
@@ -5139,7 +5139,7 @@ class PagureLibtests(tests.Modeltests):
foo bar
"""
- expected = """
+ expected = """
Left-aligned |
@@ -5160,7 +5160,7 @@ foo bar
-
foo bar
"""
+
foo bar
"""
with self.app.application.app_context():
html = pagure.lib.query.text2markdown(text)
@@ -5182,7 +5182,7 @@ foo bar
foo bar
"""
- expected = """
+ expected = """
Left-aligned |
@@ -5203,7 +5203,7 @@ foo bar
-
foo bar
"""
+
foo bar
"""
with self.app.application.app_context():
html = pagure.lib.query.text2markdown(text)