Commit 30e784d7 authored by ViolanteCodes's avatar ViolanteCodes
Browse files

added a second gl object to views.py, gl_public, which only does a public API...

added a second gl object to views.py, gl_public, which only does a public API call (no token). Replaced object in pagination tests with public object
parent 26085a02
......@@ -307,7 +307,7 @@ class TestProjectDetailViewPagination(TestCase):
tor_project = Project(gitlab_id=426)
tor_project.save()
self.tor_project = tor_project
self.gl_project = gitlab_get_project(426, lazy=True)
self.gl_project = gl_public.projects.get(426, lazy=True)
self.open_issues_metadata = self.get_issues_metadata('opened')
self.closed_issues_metadata = self.get_issues_metadata('closed')
# Get metadata for open issues, including total and pages
......
......@@ -110,6 +110,7 @@ class PassUserIdentifierMixin:
# Easy to parse version of GitLab-Python functions.
# ----------------------------------------------------------------------
gl = gitlab.Gitlab(settings.GITLAB_URL, private_token=settings.GITLAB_SECRET_TOKEN)
gl_public = gitlab.Gitlab(settings.GITLAB_URL)
def gitlab_get_project(project, lazy=False):
"""Takes an integer, and grabs a gitlab project where gitlab_id
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment