From a9314d7dd97cf743915017d24540dd3d3a315fd3 Mon Sep 17 00:00:00 2001
From: Julen Landa Alustiza
Date: Jun 25 2019 05:47:45 +0000
Subject: [PATCH 1/4] fix typo on text2markdown test
---
diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py
index 790d234..b1b625a 100644
--- a/tests/test_pagure_lib.py
+++ b/tests/test_pagure_lib.py
@@ -4075,7 +4075,7 @@ class PagureLibtests(tests.Modeltests):
@patch("flask.g")
@patch("pagure.lib.notify.send_email", MagicMock(return_value=True))
def test_text2markdown(self, g, req, reqget):
- """ Test the test2markdown method in pagure.lib.query. """
+ """ Test the text2markdown method in pagure.lib.query. """
pagure.config.config["TESTING"] = True
pagure.config.config["SERVER_NAME"] = "localhost.localdomain"
@@ -4367,7 +4367,7 @@ class PagureLibtests(tests.Modeltests):
self.assertEqual(html, expected[idx])
def test_text2markdown_exception(self):
- """ Test the test2markdown method in pagure.lib.query. """
+ """ Test the text2markdown method in pagure.lib.query. """
text = "test#1 bazinga!"
expected_html = "test#1 bazinga!"
@@ -4376,7 +4376,7 @@ class PagureLibtests(tests.Modeltests):
self.assertEqual(html, expected_html)
def test_text2markdown_empty_string(self):
- """ Test the test2markdown method in pagure.lib.query. """
+ """ Test the text2markdown method in pagure.lib.query. """
text = ""
expected_html = ""
From 4cf60ef0524696009b6e7696fcb496d0634cfccb Mon Sep 17 00:00:00 2001
From: Julen Landa Alustiza
Date: Jun 25 2019 06:09:03 +0000
Subject: [PATCH 2/4] tests: fix black checking on tests
---
diff --git a/tests/test_style.py b/tests/test_style.py
index 63847b9..717b814 100644
--- a/tests/test_style.py
+++ b/tests/test_style.py
@@ -84,6 +84,8 @@ class TestStyle(unittest.TestCase):
"-l",
"79",
"--check",
+ "--exclude",
+ '"/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist)/"',
REPO_PATH,
TESTS_PATH,
]
From 0cafab1d42755b45c22d2e2b095ca35203515199 Mon Sep 17 00:00:00 2001
From: Julen Landa Alustiza
Date: Jun 25 2019 06:09:18 +0000
Subject: [PATCH 3/4] tests: fix black formatting on tests
---
diff --git a/tests/test_pagure_flask_api_issue.py b/tests/test_pagure_flask_api_issue.py
index a1d3918..80a74f3 100644
--- a/tests/test_pagure_flask_api_issue.py
+++ b/tests/test_pagure_flask_api_issue.py
@@ -1579,7 +1579,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest):
data = {
"title": "test issue",
"issue_content": "This issue needs attention",
- "private": True
+ "private": True,
}
# Create an issue
diff --git a/tests/test_pagure_flask_api_user.py b/tests/test_pagure_flask_api_user.py
index e93d5b5..e85704c 100644
--- a/tests/test_pagure_flask_api_user.py
+++ b/tests/test_pagure_flask_api_user.py
@@ -427,7 +427,9 @@ 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 +534,9 @@ 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 +645,9 @@ 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 37f16d5..1778268 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -1440,7 +1440,9 @@ class PagureFlaskApptests(tests.Modeltests):
text = "Cf commit %s" % first_commit.oid.hex
exp = (
'".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_fork.py b/tests/test_pagure_flask_ui_fork.py
index a2c34d8..0a95f39 100644
--- a/tests/test_pagure_flask_ui_fork.py
+++ b/tests/test_pagure_flask_ui_fork.py
@@ -2564,7 +2564,7 @@ More information
self.assertIn(
''
- ' master',
+ " master",
output_text,
)
@@ -2789,7 +2789,7 @@ More information
self.assertIn(
''
- ' master',
+ " master",
output_text,
)
@@ -3106,13 +3106,13 @@ More information
self.assertIn(
''
- ' master',
+ " master",
output_text,
)
self.assertIn(
''
- ' random_branch',
+ " random_branch",
output_text,
)
@@ -3208,13 +3208,13 @@ More information
self.assertIn(
''
- ' master',
+ " master",
output_text,
)
self.assertIn(
''
- ' random_branch',
+ " random_branch",
output_text,
)
@@ -4776,12 +4776,12 @@ class TestTicketAccessEditPRMetadata(tests.Modeltests):
output_text,
)
self.assertIn(
- '',
- '',
- output_text,
- )
+ '',
+ '',
+ output_text,
+ )
self.assertNotIn(
'