GeezerVison is showing github.com — Hotfix typo bug · Diamond192/python-github3@6d1cdde
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: pygithub3/github.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ def __init__(self, **config): | 17 | 17 | from pygithub3.services.users import User | 18 | 18 | from pygithub3.services.repos import Repo | 19 | 19 | from pygithub3.services.gists import Gist | 20 | | - from pygithub3.services.events import Events | | 20 | + from pygithub3.services.events import Event | 21 | 21 | from pygithub3.services.git_data import GitData | 22 | 22 | from pygithub3.services.pull_requests import PullRequests | 23 | 23 | from pygithub3.services.orgs import Org | @@ -29,7 +29,7 @@ def __init__(self, **config): | 29 | 29 | self._pull_requests = PullRequests(**config) | 30 | 30 | self._orgs = Org(**config) | 31 | 31 | self._issues = Issue(**config) | 32 | | - self._events = Events(**config) | | 32 | + self._events = Event(**config) | 33 | 33 |
| 34 | 34 | @property | 35 | 35 | def remaining_requests(self): | |
Collapse file Copy file name to clipboardExpand all lines: pygithub3/tests/core/test_client.py +15Lines changed: 15 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 |
| 7 | 7 | from pygithub3.core.client import Client | 8 | 8 | from pygithub3.exceptions import NotFound, BadRequest, UnprocessableEntity | | 9 | +from pygithub3.github import Github | 9 | 10 | from pygithub3.tests.utils.base import mock_response | 10 | 11 | from pygithub3.tests.utils.core import TestCase | 11 | 12 |
| @@ -99,3 +100,17 @@ def test_raise_UnprocessableEntity(self, request_method): | 99 | 100 | request_method.return_value.status_code = 422 | 100 | 101 | request_method.return_value.content = {} | 101 | 102 | self.assertRaises(UnprocessableEntity, *self.callback) | | 103 | + | | 104 | +class TestGithubGlue(TestCase): | | 105 | + | | 106 | + def test_init(self): | | 107 | + gh = Github(login='dummy', password='dummy', user='dummy', | | 108 | + repo='dummy') | | 109 | + self.assertTrue(getattr(gh, '_users', False)) | | 110 | + self.assertTrue(getattr(gh, '_repos', False)) | | 111 | + self.assertTrue(getattr(gh, '_gists', False)) | | 112 | + self.assertTrue(getattr(gh, '_git_data', False)) | | 113 | + self.assertTrue(getattr(gh, '_pull_requests', False)) | | 114 | + self.assertTrue(getattr(gh, '_orgs', False)) | | 115 | + self.assertTrue(getattr(gh, '_issues', False)) | | 116 | + self.assertTrue(getattr(gh, '_events', False)) |
|