diff --git a/tests/test_pagure_flask_api_ui_private_repo.py b/tests/test_pagure_flask_api_ui_private_repo.py index af6def7..2fe9166 100644 --- a/tests/test_pagure_flask_api_ui_private_repo.py +++ b/tests/test_pagure_flask_api_ui_private_repo.py @@ -933,6 +933,19 @@ class PagurePrivateRepotest(tests.Modeltests): "total_projects": 1, "projects": [ { + "access_groups": { + "admin": [], + "commit": [], + "ticket": [] + }, + "access_users": { + "admin": [], + "commit": [], + "owner": [ + "pingou" + ], + "ticket": [] + }, "close_status": [], "custom_keys": [], "date_created": "1436527638", @@ -970,6 +983,19 @@ class PagurePrivateRepotest(tests.Modeltests): "total_projects": 1, "projects": [ { + "access_groups": { + "admin": [], + "commit": [], + "ticket": [] + }, + "access_users": { + "admin": [], + "commit": [], + "owner": [ + "pingou" + ], + "ticket": [] + }, "close_status": [], "custom_keys": [], "date_created": "1436527638", @@ -1074,6 +1100,19 @@ class PagurePrivateRepotest(tests.Modeltests): "id": 1, "initial_comment": None, "project": { + "access_groups": { + "admin": [], + "commit": [], + "ticket": [] + }, + "access_users": { + "admin": [], + "commit": [], + "owner": [ + "pingou" + ], + "ticket": [] + }, "close_status": [], "custom_keys": [], "date_created": "1431414800", @@ -1093,6 +1132,19 @@ class PagurePrivateRepotest(tests.Modeltests): }, "remote_git": None, "repo_from": { + "access_groups": { + "admin": [], + "commit": [], + "ticket": [] + }, + "access_users": { + "admin": [], + "commit": [], + "owner": [ + "pingou" + ], + "ticket": [] + }, "close_status": [], "custom_keys": [], "date_created": "1431414800", @@ -1164,6 +1216,19 @@ class PagurePrivateRepotest(tests.Modeltests): "id": 1, "initial_comment": None, "project": { + "access_groups": { + "admin": [], + "commit": [], + "ticket": [] + }, + "access_users": { + "admin": [], + "commit": [], + "owner": [ + "pingou" + ], + "ticket": [] + }, "close_status": [], "custom_keys": [], "date_created": "1431414800", @@ -1183,6 +1248,19 @@ class PagurePrivateRepotest(tests.Modeltests): }, "remote_git": None, "repo_from": { + "access_groups": { + "admin": [], + "commit": [], + "ticket": [] + }, + "access_users": { + "admin": [], + "commit": [], + "owner": [ + "pingou" + ], + "ticket": [] + }, "close_status": [], "custom_keys": [], "date_created": "1431414800", diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py index b89f2a4..3859364 100644 --- a/tests/test_pagure_flask_ui_issues.py +++ b/tests/test_pagure_flask_ui_issues.py @@ -652,7 +652,7 @@ class PagureFlaskIssuestests(tests.Modeltests): in output.data) # Create issues to play with - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.get_authorized_project(self.session, 'test') # Add user 'foo' with ticket access on repo msg = pagure.lib.add_user_to_project( @@ -706,7 +706,7 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertEqual(output.status_code, 404) # Create issues to play with - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.get_authorized_project(self.session, 'test') msg = pagure.lib.new_issue( session=self.session, repo=repo, @@ -719,7 +719,7 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertEqual(msg.title, 'Test issue') # Add user 'foo' with ticket access on repo - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.get_authorized_project(self.session, 'test') msg = pagure.lib.add_user_to_project( self.session, repo, @@ -731,7 +731,7 @@ class PagureFlaskIssuestests(tests.Modeltests): self.session.commit() # Set some custom fields - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.get_authorized_project(self.session, 'test') msg = pagure.lib.set_custom_key_fields( self.session, repo, @@ -826,7 +826,7 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertEqual(output.status_code, 404) # Create issues to play with - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.get_authorized_project(self.session, 'test') msg = pagure.lib.new_issue( session=self.session, repo=repo, diff --git a/tests/test_pagure_lib_git.py b/tests/test_pagure_lib_git.py index 8ce5000..f53abe8 100644 --- a/tests/test_pagure_lib_git.py +++ b/tests/test_pagure_lib_git.py @@ -954,7 +954,7 @@ repo requests/forks/pingou/test2 """ tests.create_projects(self.session) - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.lib._get_project(self.session, 'test') # Make the project enforce the PR workflow settings = repo.settings settings['pull_request_access_only'] = True @@ -1063,7 +1063,7 @@ repo requests/forks/pingou/test3 """ tests.create_projects(self.session) - repo = pagure.lib.get_project(self.session, 'test') + repo = pagure.lib._get_project(self.session, 'test') self.assertFalse(repo.settings['pull_request_access_only']) # Add an user to a project diff --git a/tests/test_pagure_lib_git_diff_pr.py b/tests/test_pagure_lib_git_diff_pr.py index f6e588b..cfa09ad 100644 --- a/tests/test_pagure_lib_git_diff_pr.py +++ b/tests/test_pagure_lib_git_diff_pr.py @@ -190,8 +190,8 @@ class PagureFlaskForkPrtests(tests.Modeltests): shutil.rmtree(newpath) # Create the PR between the two repos - repo = pagure.lib.get_project(self.session, 'test') - forked_repo = pagure.lib.get_project( + repo = pagure.get_authorized_project(self.session, 'test') + forked_repo = pagure.get_authorized_project( self.session, 'test', user='pingou') req = pagure.lib.new_pull_request(