diff --git a/tests/__init__.py b/tests/__init__.py index e374add..b1badba 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -92,7 +92,7 @@ class Modeltests(unittest.TestCase): if filename.endswith('.git') and os.path.isdir(filename): shutil.rmtree(filename) - for folder in ['tickets', 'repos', 'forks', 'docs']: + for folder in ['tickets', 'repos', 'forks', 'docs', 'requests']: folder = os.path.join(HERE, folder) if os.path.exists(folder): shutil.rmtree(folder) diff --git a/tests/test_progit_flask_ui_app.py b/tests/test_progit_flask_ui_app.py index a5bca7d..0d68377 100644 --- a/tests/test_progit_flask_ui_app.py +++ b/tests/test_progit_flask_ui_app.py @@ -46,6 +46,8 @@ class ProgitFlaskApptests(tests.Modeltests): tests.HERE, 'tickets') progit.APP.config['DOCS_FOLDER'] = os.path.join( tests.HERE, 'docs') + progit.APP.config['REQUESTS_FOLDER'] = os.path.join( + tests.HERE, 'requests') self.app = progit.APP.test_client() def test_index(self): @@ -128,6 +130,8 @@ class ProgitFlaskApptests(tests.Modeltests): os.path.join(tests.HERE, 'tickets', 'project#1.git'))) self.assertFalse(os.path.exists( os.path.join(tests.HERE, 'docs', 'project#1.git'))) + self.assertFalse(os.path.exists( + os.path.join(tests.HERE, 'requests', 'project#1.git'))) user = tests.FakeUser() with tests.user_set(progit.APP, user): @@ -184,6 +188,8 @@ class ProgitFlaskApptests(tests.Modeltests): os.path.join(tests.HERE, 'tickets', 'project#1.git'))) self.assertTrue(os.path.exists( os.path.join(tests.HERE, 'docs', 'project#1.git'))) + self.assertTrue(os.path.exists( + os.path.join(tests.HERE, 'requests', 'project#1.git'))) def test_user_settings(self): """ Test the user_settings endpoint. """ diff --git a/tests/test_progit_lib_git.py b/tests/test_progit_lib_git.py index 8c75631..db69b14 100644 --- a/tests/test_progit_lib_git.py +++ b/tests/test_progit_lib_git.py @@ -304,7 +304,7 @@ index 0000000..60f7480 --- /dev/null +++ b/456 @@ -0,0 +1 @@ -+{"status": "Open", "title": "Test issue", "private": false, "content": "We should work on this", "user": {"fullname": "PY C", "name": "pingou", "emails": ["bar@pingou.com", "foo@pingou.com"]}, "date_created": null, "id": 1, "comments": []} ++{"status": "Open", "blocks": "", "tags": "", "title": "Test issue", "private": false, "content": "We should work on this", "depends": "", "user": {"fullname": "PY C", "name": "pingou", "emails": ["bar@pingou.com", "foo@pingou.com"]}, "date_created": null, "id": 1, "comments": []} \ No newline at end of file """ @@ -362,9 +362,9 @@ index 458821a..77674a8 --- a/123 +++ b/456 @@ -1 +1 @@ --{"status": "Open", "title": "Test issue", "private": false, "content": "We should work on this", "user": {"fullname": "PY C", "name": "pingou", "emails": ["bar@pingou.com", "foo@pingou.com"]}, "date_created": null, "id": 1, "comments": []} +-{"status": "Open", "blocks": "", "tags": "", "title": "Test issue", "private": false, "content": "We should work on this", "depends": "", "user": {"fullname": "PY C", "name": "pingou", "emails": ["bar@pingou.com", "foo@pingou.com"]}, "date_created": null, "id": 1, "comments": []} \ No newline at end of file -+{"status": "Open", "title": "Test issue", "private": false, "content": "We should work on this", "user": {"fullname": "PY C", "name": "pingou", "emails": ["bar@pingou.com", "foo@pingou.com"]}, "date_created": null, "id": 1, "comments": [{"comment": "Hey look a comment!", "date_created": null, "id": 1, "parent": null, "user": {"fullname": "foo bar", "name": "foo", "emails": ["foo@bar.com"]}}]} ++{"status": "Open", "blocks": "", "tags": "", "title": "Test issue", "private": false, "content": "We should work on this", "depends": "", "user": {"fullname": "PY C", "name": "pingou", "emails": ["bar@pingou.com", "foo@pingou.com"]}, "date_created": null, "id": 1, "comments": [{"comment": "Hey look a comment!", "date_created": null, "id": 1, "parent": null, "user": {"fullname": "foo bar", "name": "foo", "emails": ["foo@bar.com"]}}]} \ No newline at end of file """