From 3ab97d6145b3f69276febababf0efa28548bfc0c Mon Sep 17 00:00:00 2001 From: ton-katsu Date: Tue, 21 Apr 2020 10:49:32 +0900 Subject: [PATCH] Add some attributes. (#1468) * Add some attributes to Repository and Organization * Format. * small fix * Add some test. --- github/Organization.py | 74 +++++++++++++++++++ github/Organization.pyi | 12 +++ github/Repository.py | 35 +++++++++ github/Repository.pyi | 6 ++ tests/Organization.py | 37 ++++++++-- .../Organization.testCreateFork.txt | 5 +- ...ization.testCreateRepoWithAllArguments.txt | 2 +- ...ion.testCreateRepoWithMinimalArguments.txt | 3 +- ...ation.testCreateRepositoryWithAutoInit.txt | 3 +- .../ReplayData/Organization.testGetRepos.txt | 3 +- .../Organization.testGetReposSorted.txt | 3 +- .../Organization.testGetReposWithType.txt | 3 +- tests/ReplayData/Repository.setUp.txt | 2 +- tests/Repository.py | 9 +++ 14 files changed, 175 insertions(+), 22 deletions(-) diff --git a/github/Organization.py b/github/Organization.py index 8f69ef2d..9bb2003b 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -111,6 +111,14 @@ class Organization(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._created_at) return self._created_at.value + @property + def default_repository_permission(self): + """ + :type: string + """ + self._completeIfNotSet(self._default_repository_permission) + return self._default_repository_permission.value + @property def description(self): """ @@ -167,6 +175,30 @@ class Organization(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._gravatar_id) return self._gravatar_id.value + @property + def has_organization_projects(self): + """ + :type: bool + """ + self._completeIfNotSet(self._has_organization_projects) + return self._has_organization_projects.value + + @property + def has_repository_projects(self): + """ + :type: bool + """ + self._completeIfNotSet(self._has_repository_projects) + return self._has_repository_projects.value + + @property + def hooks_url(self): + """ + :type: string + """ + self._completeIfNotSet(self._hooks_url) + return self._hooks_url.value + @property def html_url(self): """ @@ -183,6 +215,14 @@ class Organization(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._id) return self._id.value + @property + def issues_url(self): + """ + :type: string + """ + self._completeIfNotSet(self._issues_url) + return self._issues_url.value + @property def location(self): """ @@ -199,6 +239,14 @@ class Organization(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._login) return self._login.value + @property + def members_can_create_repositories(self): + """ + :type: bool + """ + self._completeIfNotSet(self._members_can_create_repositories) + return self._members_can_create_repositories.value + @property def members_url(self): """ @@ -1109,6 +1157,12 @@ class Organization(github.GithubObject.CompletableGithubObject): ) def _initAttributes(self): + self._default_repository_permission = github.GithubObject.NotSet + self._has_organization_projects = github.GithubObject.NotSet + self._has_repository_projects = github.GithubObject.NotSet + self._hooks_url = github.GithubObject.NotSet + self._issues_url = github.GithubObject.NotSet + self._members_can_create_repositories = github.GithubObject.NotSet self._two_factor_requirement_enabled = github.GithubObject.NotSet self._avatar_url = github.GithubObject.NotSet self._billing_email = github.GithubObject.NotSet @@ -1154,6 +1208,10 @@ class Organization(github.GithubObject.CompletableGithubObject): self._company = self._makeStringAttribute(attributes["company"]) if "created_at" in attributes: # pragma no branch self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) + if "default_repository_permission" in attributes: # pragma no branch + self._default_repository_permission = self._makeStringAttribute( + attributes["default_repository_permission"] + ) if "description" in attributes: # pragma no branch self._description = self._makeStringAttribute(attributes["description"]) if "disk_usage" in attributes: # pragma no branch @@ -1168,14 +1226,30 @@ class Organization(github.GithubObject.CompletableGithubObject): self._following = self._makeIntAttribute(attributes["following"]) if "gravatar_id" in attributes: # pragma no branch self._gravatar_id = self._makeStringAttribute(attributes["gravatar_id"]) + if "has_organization_projects" in attributes: # pragma no branch + self._has_organization_projects = self._makeBoolAttribute( + attributes["has_organization_projects"] + ) + if "has_repository_projects" in attributes: # pragma no branch + self._has_repository_projects = self._makeBoolAttribute( + attributes["has_repository_projects"] + ) + if "hooks_url" in attributes: # pragma no branch + self._hooks_url = self._makeStringAttribute(attributes["hooks_url"]) if "html_url" in attributes: # pragma no branch self._html_url = self._makeStringAttribute(attributes["html_url"]) if "id" in attributes: # pragma no branch self._id = self._makeIntAttribute(attributes["id"]) + if "issues_url" in attributes: # pragma no branch + self._issues_url = self._makeStringAttribute(attributes["issues_url"]) if "location" in attributes: # pragma no branch self._location = self._makeStringAttribute(attributes["location"]) if "login" in attributes: # pragma no branch self._login = self._makeStringAttribute(attributes["login"]) + if "members_can_create_repositories" in attributes: # pragma no branch + self._members_can_create_repositories = self._makeBoolAttribute( + attributes["members_can_create_repositories"] + ) if "members_url" in attributes: # pragma no branch self._members_url = self._makeStringAttribute(attributes["members_url"]) if "name" in attributes: # pragma no branch diff --git a/github/Organization.pyi b/github/Organization.pyi index a923ef11..2bbefc02 100644 --- a/github/Organization.pyi +++ b/github/Organization.pyi @@ -74,6 +74,8 @@ class Organization: def created_at(self) -> datetime: ... def delete_hook(self, id: int) -> None: ... @property + def default_repository_permission(self) -> str: ... + @property def description(self) -> str: ... @property def disk_usage(self) -> int: ... @@ -140,9 +142,17 @@ class Organization: def has_in_members(self, member: NamedUser) -> bool: ... def has_in_public_members(self, public_member: NamedUser) -> bool: ... @property + def has_organization_projects(self) -> bool: ... + @property + def has_repository_projects(self) -> bool: ... + @property + def hooks_url(self) -> str: ... + @property def html_url(self) -> str: ... @property def id(self) -> int: ... + @property + def issues_url(self) -> str: ... def invitations(self) -> PaginatedList: ... def invite_user( self, @@ -156,6 +166,8 @@ class Organization: @property def login(self) -> str: ... @property + def members_can_create_repositories(self) -> bool: ... + @property def members_url(self) -> str: ... @property def name(self) -> Optional[str]: ... diff --git a/github/Repository.py b/github/Repository.py index 681d8324..11fe3d32 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -291,6 +291,14 @@ class Repository(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._delete_branch_on_merge) return self._delete_branch_on_merge.value + @property + def deployments_url(self): + """ + :type: string + """ + self._completeIfNotSet(self._deployments_url) + return self._deployments_url.value + @property def description(self): """ @@ -403,6 +411,14 @@ class Repository(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._has_issues) return self._has_issues.value + @property + def has_pages(self): + """ + :type: bool + """ + self._completeIfNotSet(self._has_pages) + return self._has_pages.value + @property def has_projects(self): """ @@ -635,6 +651,14 @@ class Repository(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._pushed_at) return self._pushed_at.value + @property + def releases_url(self): + """ + :type: string + """ + self._completeIfNotSet(self._releases_url) + return self._releases_url.value + @property def size(self): """ @@ -3273,6 +3297,7 @@ class Repository(github.GithubObject.CompletableGithubObject): self._created_at = github.GithubObject.NotSet self._default_branch = github.GithubObject.NotSet self._delete_branch_on_merge = github.GithubObject.NotSet + self._deployments_url = github.GithubObject.NotSet self._description = github.GithubObject.NotSet self._downloads_url = github.GithubObject.NotSet self._events_url = github.GithubObject.NotSet @@ -3287,6 +3312,7 @@ class Repository(github.GithubObject.CompletableGithubObject): self._git_url = github.GithubObject.NotSet self._has_downloads = github.GithubObject.NotSet self._has_issues = github.GithubObject.NotSet + self._has_pages = github.GithubObject.NotSet self._has_projects = github.GithubObject.NotSet self._has_wiki = github.GithubObject.NotSet self._homepage = github.GithubObject.NotSet @@ -3316,6 +3342,7 @@ class Repository(github.GithubObject.CompletableGithubObject): self._private = github.GithubObject.NotSet self._pulls_url = github.GithubObject.NotSet self._pushed_at = github.GithubObject.NotSet + self._releases_url = github.GithubObject.NotSet self._size = github.GithubObject.NotSet self._source = github.GithubObject.NotSet self._ssh_url = github.GithubObject.NotSet @@ -3386,6 +3413,10 @@ class Repository(github.GithubObject.CompletableGithubObject): self._delete_branch_on_merge = self._makeBoolAttribute( attributes["delete_branch_on_merge"] ) + if "deployments_url" in attributes: # pragma no branch + self._deployments_url = self._makeStringAttribute( + attributes["deployments_url"] + ) if "description" in attributes: # pragma no branch self._description = self._makeStringAttribute(attributes["description"]) if "downloads_url" in attributes: # pragma no branch @@ -3416,6 +3447,8 @@ class Repository(github.GithubObject.CompletableGithubObject): self._has_downloads = self._makeBoolAttribute(attributes["has_downloads"]) if "has_issues" in attributes: # pragma no branch self._has_issues = self._makeBoolAttribute(attributes["has_issues"]) + if "has_pages" in attributes: # pragma no branch + self._has_pages = self._makeBoolAttribute(attributes["has_pages"]) if "has_projects" in attributes: # pragma no branch self._has_projects = self._makeBoolAttribute(attributes["has_projects"]) if "has_wiki" in attributes: # pragma no branch @@ -3490,6 +3523,8 @@ class Repository(github.GithubObject.CompletableGithubObject): self._pulls_url = self._makeStringAttribute(attributes["pulls_url"]) if "pushed_at" in attributes: # pragma no branch self._pushed_at = self._makeDatetimeAttribute(attributes["pushed_at"]) + if "releases_url" in attributes: # pragma no branch + self._releases_url = self._makeStringAttribute(attributes["releases_url"]) if "size" in attributes: # pragma no branch self._size = self._makeIntAttribute(attributes["size"]) if "source" in attributes: # pragma no branch diff --git a/github/Repository.pyi b/github/Repository.pyi index 829f84a3..81554bb7 100644 --- a/github/Repository.pyi +++ b/github/Repository.pyi @@ -193,6 +193,8 @@ class Repository: author: Union[InputGitAuthor, _NotSetType] = ..., ) -> Dict[str, Union[Commit, _NotSetType]]: ... @property + def deployments_url(self) -> str: ... + @property def description(self) -> str: ... def disable_automated_security_fixes(self) -> bool: ... def disable_vulnerability_alert(self) -> bool: ... @@ -381,6 +383,8 @@ class Repository: @property def has_issues(self) -> bool: ... @property + def has_pages(self) -> bool: ... + @property def has_projects(self) -> bool: ... @property def has_wiki(self) -> bool: ... @@ -443,6 +447,8 @@ class Repository: def pulls_url(self) -> str: ... @property def pushed_at(self) -> datetime: ... + @property + def releases_url(self) -> str: ... def remove_from_collaborators( self, collaborator: Union[str, NamedUser] ) -> None: ... diff --git a/tests/Organization.py b/tests/Organization.py index 16421d19..a2a538cc 100644 --- a/tests/Organization.py +++ b/tests/Organization.py @@ -55,16 +55,26 @@ class Organization(Framework.TestCase): self.assertEqual(self.org.collaborators, 9) self.assertEqual(self.org.company, None) self.assertEqual(self.org.created_at, datetime.datetime(2014, 1, 9, 16, 56, 17)) + self.assertEqual(self.org.default_repository_permission, "none") self.assertEqual(self.org.description, "BeaverSoftware writes software.") self.assertEqual(self.org.disk_usage, 2) self.assertEqual(self.org.email, "") self.assertEqual(self.org.followers, 0) self.assertEqual(self.org.following, 0) self.assertEqual(self.org.gravatar_id, None) + self.assertTrue(self.org.has_organization_projects) + self.assertTrue(self.org.has_repository_projects) + self.assertEqual( + self.org.hooks_url, "https://api.github.com/orgs/BeaverSoftware/hooks" + ) self.assertEqual(self.org.html_url, "https://github.com/BeaverSoftware") self.assertEqual(self.org.id, 1) + self.assertEqual( + self.org.issues_url, "https://api.github.com/orgs/BeaverSoftware/issues" + ) self.assertEqual(self.org.location, "Paris, France") self.assertEqual(self.org.login, "BeaverSoftware") + self.assertFalse(self.org.members_can_create_repositories) self.assertEqual(self.org.name, "BeaverSoftware") self.assertEqual(self.org.owned_private_repos, 0) self.assertEqual(self.org.plan.name, "free") @@ -217,21 +227,26 @@ class Organization(Framework.TestCase): self.assertFalse(self.org.has_in_members(lyloa)) def testGetRepos(self): + repos = self.org.get_repos() self.assertListKeyEqual( - self.org.get_repos(), lambda r: r.name, ["FatherBeaver", "TestPyGithub"] + repos, lambda r: r.name, ["FatherBeaver", "TestPyGithub"] ) + self.assertListKeyEqual(repos, lambda r: r.has_pages, [True, False]) + self.assertListKeyEqual(repos, lambda r: r.has_wiki, [True, True]) def testGetReposSorted(self): + repos = self.org.get_repos(sort="updated", direction="desc") self.assertListKeyEqual( - self.org.get_repos(sort="updated", direction="desc"), - lambda r: r.name, - ["TestPyGithub", "FatherBeaver"], + repos, lambda r: r.name, ["TestPyGithub", "FatherBeaver"], + ) + self.assertListKeyEqual( + repos, lambda r: r.has_pages, [False, True], ) def testGetReposWithType(self): - self.assertListKeyEqual( - self.org.get_repos("public"), lambda r: r.name, ["FatherBeaver", "PyGithub"] - ) + repos = self.org.get_repos("public") + self.assertListKeyEqual(repos, lambda r: r.name, ["FatherBeaver", "PyGithub"]) + self.assertListKeyEqual(repos, lambda r: r.has_pages, [True, True]) def testGetEvents(self): self.assertListKeyEqual( @@ -292,6 +307,8 @@ class Organization(Framework.TestCase): self.assertEqual( repo.url, "https://api.github.com/repos/BeaverSoftware/TestPyGithub" ) + self.assertTrue(repo.has_wiki) + self.assertTrue(repo.has_pages) def testCreateRepoWithAllArguments(self): team = self.org.get_team(141496) @@ -313,6 +330,8 @@ class Organization(Framework.TestCase): self.assertEqual( repo.url, "https://api.github.com/repos/BeaverSoftware/TestPyGithub2" ) + self.assertFalse(repo.has_wiki) + self.assertFalse(repo.has_pages) def testCreateRepositoryWithAutoInit(self): repo = self.org.create_repo( @@ -321,6 +340,8 @@ class Organization(Framework.TestCase): self.assertEqual( repo.url, "https://api.github.com/repos/BeaverSoftware/TestPyGithub" ) + self.assertTrue(repo.has_pages) + self.assertTrue(repo.has_wiki) def testCreateFork(self): pygithub = self.g.get_user("jacquev6").get_repo("PyGithub") @@ -328,6 +349,8 @@ class Organization(Framework.TestCase): self.assertEqual( repo.url, "https://api.github.com/repos/BeaverSoftware/PyGithub" ) + self.assertFalse(repo.has_wiki) + self.assertFalse(repo.has_pages) def testInviteUserWithNeither(self): with self.assertRaises(AssertionError) as raisedexp: diff --git a/tests/ReplayData/Organization.testCreateFork.txt b/tests/ReplayData/Organization.testCreateFork.txt index 2f362310..22b02631 100644 --- a/tests/ReplayData/Organization.testCreateFork.txt +++ b/tests/ReplayData/Organization.testCreateFork.txt @@ -18,7 +18,7 @@ None None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4966'), ('content-length', '1129'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"b5c0c85b417ca8a66f4f3f3398e75532"'), ('date', 'Sun, 27 May 2012 05:23:17 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"clone_url":"https://github.com/jacquev6/PyGithub.git","mirror_url":null,"has_downloads":true,"watchers":14,"updated_at":"2012-05-26T20:54:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","has_wiki":false,"has_issues":true,"fork":false,"forks":2,"size":348,"private":false,"open_issues":15,"svn_url":"https://github.com/jacquev6/PyGithub","git_url":"git://github.com/jacquev6/PyGithub.git","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"} +{"clone_url":"https://github.com/jacquev6/PyGithub.git","mirror_url":null,"has_downloads":true,"watchers":14,"updated_at":"2012-05-26T20:54:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","has_wiki":false,"has_pages":false,"has_issues":true,"fork":false,"forks":2,"size":348,"private":false,"open_issues":15,"svn_url":"https://github.com/jacquev6/PyGithub","git_url":"git://github.com/jacquev6/PyGithub.git","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"} https POST @@ -29,5 +29,4 @@ None None 202 [('status', '202 Accepted'), ('x-ratelimit-remaining', '4965'), ('content-length', '3681'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"e4abc3ca2f8a9ccbe868ead57057a0e8"'), ('date', 'Sun, 27 May 2012 05:23:18 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"parent":{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"updated_at":"2012-05-27T05:23:18Z","homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_wiki":false,"has_issues":true,"fork":false,"forks":3,"git_url":"git://github.com/jacquev6/PyGithub.git","size":348,"private":false,"open_issues":15,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"},"organization":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"clone_url":"https://github.com/BeaverSoftware/PyGithub.git","has_downloads":true,"watchers":1,"updated_at":"2012-05-27T05:23:18Z","source":{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"updated_at":"2012-05-27T05:23:18Z","homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_wiki":false,"has_issues":true,"fork":false,"forks":3,"git_url":"git://github.com/jacquev6/PyGithub.git","size":348,"private":false,"open_issues":15,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"},"permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/PyGithub","mirror_url":null,"has_wiki":false,"has_issues":false,"fork":true,"forks":0,"git_url":"git://github.com/BeaverSoftware/PyGithub.git","size":348,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/PyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:BeaverSoftware/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-05-27T05:23:17Z","id":4460027,"html_url":"https://github.com/BeaverSoftware/PyGithub","full_name":"BeaverSoftware/PyGithub"} - +{"parent":{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"updated_at":"2012-05-27T05:23:18Z","homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_wiki":false,"has_pages":false,"has_issues":true,"fork":false,"forks":3,"git_url":"git://github.com/jacquev6/PyGithub.git","size":348,"private":false,"open_issues":15,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"},"organization":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"clone_url":"https://github.com/BeaverSoftware/PyGithub.git","has_downloads":true,"watchers":1,"updated_at":"2012-05-27T05:23:18Z","source":{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"updated_at":"2012-05-27T05:23:18Z","homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_wiki":false,"has_pages":false,"has_issues":true,"fork":false,"forks":3,"git_url":"git://github.com/jacquev6/PyGithub.git","size":348,"private":false,"open_issues":15,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"},"permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/PyGithub","mirror_url":null,"has_wiki":false,"has_pages":false,"has_issues":false,"fork":true,"forks":0,"git_url":"git://github.com/BeaverSoftware/PyGithub.git","size":348,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/PyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:BeaverSoftware/PyGithub.git","pushed_at":"2012-05-26T20:54:13Z","created_at":"2012-05-27T05:23:17Z","id":4460027,"html_url":"https://github.com/BeaverSoftware/PyGithub","full_name":"BeaverSoftware/PyGithub"} diff --git a/tests/ReplayData/Organization.testCreateRepoWithAllArguments.txt b/tests/ReplayData/Organization.testCreateRepoWithAllArguments.txt index 710f9e2e..2020769d 100644 --- a/tests/ReplayData/Organization.testCreateRepoWithAllArguments.txt +++ b/tests/ReplayData/Organization.testCreateRepoWithAllArguments.txt @@ -18,4 +18,4 @@ None {"has_wiki": false, "name": "TestPyGithub2", "has_downloads": false, "private": false, "team_id": 141496, "has_issues": false, "homepage": "http://foobar.com", "description": "Repo created by PyGithub", "has_projects": false, "allow_squash_merge": false, "allow_merge_commit": false, "allow_rebase_merge": true, "delete_branch_on_merge": false} 201 [('status', '201 Created'), ('x-ratelimit-remaining', '4969'), ('content-length', '1501'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"feb513e01eaf8e89967068fe8ed44cc7"'), ('date', 'Sun, 27 May 2012 05:20:43 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/BeaverSoftware/TestPyGithub2')] -{"organization":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"clone_url":"https://github.com/BeaverSoftware/TestPyGithub2.git","has_downloads":false,"watchers":1,"updated_at":"2012-05-27T05:20:42Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://foobar.com","url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub2","mirror_url":null,"has_wiki":false,"has_issues":false,"fork":false,"forks":1,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub2","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"name":"TestPyGithub2","language":null,"description":"Repo created by PyGithub","ssh_url":"git@github.com:BeaverSoftware/TestPyGithub2.git","pushed_at":"2012-05-27T05:20:42Z","created_at":"2012-05-27T05:20:42Z","id":4460019,"git_url":"git://github.com/BeaverSoftware/TestPyGithub2.git","html_url":"https://github.com/BeaverSoftware/TestPyGithub2","full_name":"BeaverSoftware/TestPyGithub2", "has_projects": false, "allow_squash_merge": false, "allow_merge_commit": false, "allow_rebase_merge": true, "delete_branch_on_merge": false} +{"organization":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"clone_url":"https://github.com/BeaverSoftware/TestPyGithub2.git","has_downloads":false,"watchers":1,"updated_at":"2012-05-27T05:20:42Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://foobar.com","url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub2","mirror_url":null,"has_wiki":false,"has_pages":false,"has_issues":false,"fork":false,"forks":1,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub2","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"name":"TestPyGithub2","language":null,"description":"Repo created by PyGithub","ssh_url":"git@github.com:BeaverSoftware/TestPyGithub2.git","pushed_at":"2012-05-27T05:20:42Z","created_at":"2012-05-27T05:20:42Z","id":4460019,"git_url":"git://github.com/BeaverSoftware/TestPyGithub2.git","html_url":"https://github.com/BeaverSoftware/TestPyGithub2","full_name":"BeaverSoftware/TestPyGithub2", "has_projects": false, "allow_squash_merge": false, "allow_merge_commit": false, "allow_rebase_merge": true, "delete_branch_on_merge": false} diff --git a/tests/ReplayData/Organization.testCreateRepoWithMinimalArguments.txt b/tests/ReplayData/Organization.testCreateRepoWithMinimalArguments.txt index ba021a62..8baaf496 100644 --- a/tests/ReplayData/Organization.testCreateRepoWithMinimalArguments.txt +++ b/tests/ReplayData/Organization.testCreateRepoWithMinimalArguments.txt @@ -7,5 +7,4 @@ None {"name": "TestPyGithub"} 201 [('status', '201 Created'), ('x-ratelimit-remaining', '4971'), ('content-length', '1453'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"074f73773c425ba61e6a7738dc89b6ed"'), ('date', 'Sun, 27 May 2012 05:20:24 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/BeaverSoftware/TestPyGithub')] -{"organization":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","has_downloads":true,"watchers":1,"updated_at":"2012-05-27T05:20:24Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":null,"url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","mirror_url":null,"has_wiki":true,"has_issues":true,"fork":false,"forks":1,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"name":"TestPyGithub","language":null,"description":null,"ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","pushed_at":"2012-05-27T05:20:24Z","created_at":"2012-05-27T05:20:24Z","id":4460018,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","html_url":"https://github.com/BeaverSoftware/TestPyGithub","full_name":"BeaverSoftware/TestPyGithub"} - +{"organization":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","has_downloads":true,"watchers":1,"updated_at":"2012-05-27T05:20:24Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":null,"url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","mirror_url":null,"has_wiki":true,"has_pages":true,"has_issues":true,"fork":false,"forks":1,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","login":"BeaverSoftware","id":1424031},"name":"TestPyGithub","language":null,"description":null,"ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","pushed_at":"2012-05-27T05:20:24Z","created_at":"2012-05-27T05:20:24Z","id":4460018,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","html_url":"https://github.com/BeaverSoftware/TestPyGithub","full_name":"BeaverSoftware/TestPyGithub"} diff --git a/tests/ReplayData/Organization.testCreateRepositoryWithAutoInit.txt b/tests/ReplayData/Organization.testCreateRepositoryWithAutoInit.txt index 5b1d3853..4fbf0b36 100644 --- a/tests/ReplayData/Organization.testCreateRepositoryWithAutoInit.txt +++ b/tests/ReplayData/Organization.testCreateRepositoryWithAutoInit.txt @@ -7,5 +7,4 @@ None {"gitignore_template": "Python", "name": "TestPyGithub", "auto_init": true} 201 [('status', '201 Created'), ('content-length', '1559'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('x-ratelimit-limit', '5000'), ('x-ratelimit-remaining', '4996'), ('server', 'nginx'), ('connection', 'keep-alive'), ('etag', '"2f35ceac1b69bbfc8c38907877514e9d"'), ('location', 'https://api.github.com/repos/BeaverSoftware/TestPyGithub'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Sat, 03 Nov 2012 09:03:49 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"watchers":0,"pushed_at":"2012-11-03T09:03:49Z","forks":0,"has_issues":true,"has_downloads":true,"open_issues_count":0,"description":null,"html_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","updated_at":"2012-11-03T09:03:49Z","organization":{"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"permissions":{"push":true,"pull":true,"admin":true},"mirror_url":null,"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","language":null,"has_wiki":true,"ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","svn_url":"https://github.com/BeaverSoftware/TestPyGithub","size":0,"fork":false,"full_name":"BeaverSoftware/TestPyGithub","open_issues":0,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","forks_count":0,"name":"TestPyGithub","created_at":"2012-11-03T09:03:49Z","homepage":null,"private":false,"id":6517856,"master_branch":"master","network_count":0,"watchers_count":0} - +{"watchers":0,"pushed_at":"2012-11-03T09:03:49Z","forks":0,"has_issues":true,"has_downloads":true,"open_issues_count":0,"description":null,"html_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","updated_at":"2012-11-03T09:03:49Z","organization":{"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"permissions":{"push":true,"pull":true,"admin":true},"mirror_url":null,"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","language":null,"has_wiki":true,"has_pages":true,"ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","svn_url":"https://github.com/BeaverSoftware/TestPyGithub","size":0,"fork":false,"full_name":"BeaverSoftware/TestPyGithub","open_issues":0,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","forks_count":0,"name":"TestPyGithub","created_at":"2012-11-03T09:03:49Z","homepage":null,"private":false,"id":6517856,"master_branch":"master","network_count":0,"watchers_count":0} diff --git a/tests/ReplayData/Organization.testGetRepos.txt b/tests/ReplayData/Organization.testGetRepos.txt index fb8353cc..42e3dcea 100644 --- a/tests/ReplayData/Organization.testGetRepos.txt +++ b/tests/ReplayData/Organization.testGetRepos.txt @@ -7,5 +7,4 @@ None None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4978'), ('content-length', '2300'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"56a6b76672924aa7f1d6f1753388f04b"'), ('date', 'Sun, 27 May 2012 05:12:35 GMT'), ('content-type', 'application/json; charset=utf-8')] -[{"clone_url":"https://github.com/BeaverSoftware/FatherBeaver.git","has_downloads":true,"watchers":2,"git_url":"git://github.com/BeaverSoftware/FatherBeaver.git","updated_at":"2012-02-16T21:51:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"","url":"https://api.github.com/repos/BeaverSoftware/FatherBeaver","has_wiki":true,"has_issues":true,"fork":false,"forks":1,"mirror_url":null,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/FatherBeaver","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"FatherBeaver","language":null,"description":"","ssh_url":"git@github.com:BeaverSoftware/FatherBeaver.git","pushed_at":null,"created_at":"2012-02-09T19:32:21Z","id":3400397,"html_url":"https://github.com/BeaverSoftware/FatherBeaver","full_name":"BeaverSoftware/FatherBeaver"},{"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","has_downloads":true,"watchers":1,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","updated_at":"2012-04-25T06:51:38Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","has_wiki":true,"has_issues":false,"fork":false,"forks":0,"mirror_url":null,"size":112,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"TestPyGithub","language":null,"description":"Guinea-pig for PyGithub testing","ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","pushed_at":"2012-03-03T08:57:40Z","created_at":"2012-03-03T07:53:19Z","id":3609352,"html_url":"https://github.com/BeaverSoftware/TestPyGithub","full_name":"BeaverSoftware/TestPyGithub"}] - +[{"clone_url":"https://github.com/BeaverSoftware/FatherBeaver.git","has_downloads":true,"watchers":2,"git_url":"git://github.com/BeaverSoftware/FatherBeaver.git","updated_at":"2012-02-16T21:51:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"","url":"https://api.github.com/repos/BeaverSoftware/FatherBeaver","has_wiki":true,"has_pages":true,"has_issues":true,"fork":false,"forks":1,"mirror_url":null,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/FatherBeaver","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"FatherBeaver","language":null,"description":"","ssh_url":"git@github.com:BeaverSoftware/FatherBeaver.git","pushed_at":null,"created_at":"2012-02-09T19:32:21Z","id":3400397,"html_url":"https://github.com/BeaverSoftware/FatherBeaver","full_name":"BeaverSoftware/FatherBeaver"},{"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","has_downloads":true,"watchers":1,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","updated_at":"2012-04-25T06:51:38Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","has_wiki":true,"has_pages":false,"has_issues":false,"fork":false,"forks":0,"mirror_url":null,"size":112,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"TestPyGithub","language":null,"description":"Guinea-pig for PyGithub testing","ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","pushed_at":"2012-03-03T08:57:40Z","created_at":"2012-03-03T07:53:19Z","id":3609352,"html_url":"https://github.com/BeaverSoftware/TestPyGithub","full_name":"BeaverSoftware/TestPyGithub"}] diff --git a/tests/ReplayData/Organization.testGetReposSorted.txt b/tests/ReplayData/Organization.testGetReposSorted.txt index ace94143..67fed486 100644 --- a/tests/ReplayData/Organization.testGetReposSorted.txt +++ b/tests/ReplayData/Organization.testGetReposSorted.txt @@ -7,5 +7,4 @@ None None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4978'), ('content-length', '2300'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"56a6b76672924aa7f1d6f1753388f04b"'), ('date', 'Sun, 27 May 2012 05:12:35 GMT'), ('content-type', 'application/json; charset=utf-8')] -[{"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","has_downloads":true,"watchers":1,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","updated_at":"2012-04-25T06:51:38Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","has_wiki":true,"has_issues":false,"fork":false,"forks":0,"mirror_url":null,"size":112,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"TestPyGithub","language":null,"description":"Guinea-pig for PyGithub testing","ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","pushed_at":"2012-03-03T08:57:40Z","created_at":"2012-03-03T07:53:19Z","id":3609352,"html_url":"https://github.com/BeaverSoftware/TestPyGithub","full_name":"BeaverSoftware/TestPyGithub"},{"clone_url":"https://github.com/BeaverSoftware/FatherBeaver.git","has_downloads":true,"watchers":2,"git_url":"git://github.com/BeaverSoftware/FatherBeaver.git","updated_at":"2012-02-16T21:51:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"","url":"https://api.github.com/repos/BeaverSoftware/FatherBeaver","has_wiki":true,"has_issues":true,"fork":false,"forks":1,"mirror_url":null,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/FatherBeaver","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"FatherBeaver","language":null,"description":"","ssh_url":"git@github.com:BeaverSoftware/FatherBeaver.git","pushed_at":null,"created_at":"2012-02-09T19:32:21Z","id":3400397,"html_url":"https://github.com/BeaverSoftware/FatherBeaver","full_name":"BeaverSoftware/FatherBeaver"}] - +[{"clone_url":"https://github.com/BeaverSoftware/TestPyGithub.git","has_downloads":true,"watchers":1,"git_url":"git://github.com/BeaverSoftware/TestPyGithub.git","updated_at":"2012-04-25T06:51:38Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/TestPyGithub","has_wiki":true,"has_pages":false,"has_issues":false,"fork":false,"forks":0,"mirror_url":null,"size":112,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/TestPyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"TestPyGithub","language":null,"description":"Guinea-pig for PyGithub testing","ssh_url":"git@github.com:BeaverSoftware/TestPyGithub.git","pushed_at":"2012-03-03T08:57:40Z","created_at":"2012-03-03T07:53:19Z","id":3609352,"html_url":"https://github.com/BeaverSoftware/TestPyGithub","full_name":"BeaverSoftware/TestPyGithub"},{"clone_url":"https://github.com/BeaverSoftware/FatherBeaver.git","has_downloads":true,"watchers":2,"git_url":"git://github.com/BeaverSoftware/FatherBeaver.git","updated_at":"2012-02-16T21:51:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"","url":"https://api.github.com/repos/BeaverSoftware/FatherBeaver","has_wiki":true,"has_pages":true,"has_issues":true,"fork":false,"forks":1,"mirror_url":null,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/FatherBeaver","owner":{"url":"https://api.github.com/users/BeaverSoftware","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031,"avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png"},"name":"FatherBeaver","language":null,"description":"","ssh_url":"git@github.com:BeaverSoftware/FatherBeaver.git","pushed_at":null,"created_at":"2012-02-09T19:32:21Z","id":3400397,"html_url":"https://github.com/BeaverSoftware/FatherBeaver","full_name":"BeaverSoftware/FatherBeaver"}] diff --git a/tests/ReplayData/Organization.testGetReposWithType.txt b/tests/ReplayData/Organization.testGetReposWithType.txt index 779284c0..86f9300f 100644 --- a/tests/ReplayData/Organization.testGetReposWithType.txt +++ b/tests/ReplayData/Organization.testGetReposWithType.txt @@ -7,5 +7,4 @@ None None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4987'), ('content-length', '2291'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"4bcc5321db433ac18171c121303c77d2"'), ('date', 'Tue, 29 May 2012 18:11:16 GMT'), ('content-type', 'application/json; charset=utf-8')] -[{"mirror_url":null,"clone_url":"https://github.com/BeaverSoftware/FatherBeaver.git","has_downloads":true,"watchers":2,"updated_at":"2012-02-16T21:51:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"","url":"https://api.github.com/repos/BeaverSoftware/FatherBeaver","html_url":"https://github.com/BeaverSoftware/FatherBeaver","has_wiki":true,"has_issues":true,"fork":false,"git_url":"git://github.com/BeaverSoftware/FatherBeaver.git","forks":1,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/FatherBeaver","owner":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"name":"FatherBeaver","language":null,"description":"","ssh_url":"git@github.com:BeaverSoftware/FatherBeaver.git","pushed_at":null,"created_at":"2012-02-09T19:32:21Z","id":3400397,"full_name":"BeaverSoftware/FatherBeaver"},{"mirror_url":null,"clone_url":"https://github.com/BeaverSoftware/PyGithub.git","has_downloads":true,"watchers":1,"updated_at":"2012-05-29T18:09:14Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/PyGithub","html_url":"https://github.com/BeaverSoftware/PyGithub","has_wiki":false,"has_issues":false,"fork":true,"git_url":"git://github.com/BeaverSoftware/PyGithub.git","forks":0,"size":428,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/PyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:BeaverSoftware/PyGithub.git","pushed_at":"2012-05-29T18:05:10Z","created_at":"2012-05-29T18:03:19Z","id":4485562,"full_name":"BeaverSoftware/PyGithub"}] - +[{"mirror_url":null,"clone_url":"https://github.com/BeaverSoftware/FatherBeaver.git","has_downloads":true,"watchers":2,"updated_at":"2012-02-16T21:51:15Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"","url":"https://api.github.com/repos/BeaverSoftware/FatherBeaver","html_url":"https://github.com/BeaverSoftware/FatherBeaver","has_wiki":true,"has_pages":true,"has_issues":true,"fork":false,"git_url":"git://github.com/BeaverSoftware/FatherBeaver.git","forks":1,"size":0,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/FatherBeaver","owner":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"name":"FatherBeaver","language":null,"description":"","ssh_url":"git@github.com:BeaverSoftware/FatherBeaver.git","pushed_at":null,"created_at":"2012-02-09T19:32:21Z","id":3400397,"full_name":"BeaverSoftware/FatherBeaver"},{"mirror_url":null,"clone_url":"https://github.com/BeaverSoftware/PyGithub.git","has_downloads":true,"watchers":1,"updated_at":"2012-05-29T18:09:14Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/BeaverSoftware/PyGithub","html_url":"https://github.com/BeaverSoftware/PyGithub","has_wiki":false,"has_pages":true,"has_issues":false,"fork":true,"git_url":"git://github.com/BeaverSoftware/PyGithub.git","forks":0,"size":428,"private":false,"open_issues":0,"svn_url":"https://github.com/BeaverSoftware/PyGithub","owner":{"url":"https://api.github.com/users/BeaverSoftware","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"d563e337cac2fdc644e2aaaad1e23266","login":"BeaverSoftware","id":1424031},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:BeaverSoftware/PyGithub.git","pushed_at":"2012-05-29T18:05:10Z","created_at":"2012-05-29T18:03:19Z","id":4485562,"full_name":"BeaverSoftware/PyGithub"}] diff --git a/tests/ReplayData/Repository.setUp.txt b/tests/ReplayData/Repository.setUp.txt index 70a38eaa..8e4c7118 100644 --- a/tests/ReplayData/Repository.setUp.txt +++ b/tests/ReplayData/Repository.setUp.txt @@ -18,4 +18,4 @@ None None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4911'), ('content-length', '1129'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"1a93ec821b0bd7094340a9fc34017aa0"'), ('date', 'Sun, 27 May 2012 07:17:09 GMT'), ('content-type', 'application/json; charset=utf-8')] -{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"git_url":"git://github.com/jacquev6/PyGithub.git","updated_at":"2012-05-27T06:55:28Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_wiki":false,"has_issues":true,"fork":false,"forks":3,"size":308,"private":false,"open_issues":16,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-27T06:00:28Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"} +{"clone_url":"https://github.com/jacquev6/PyGithub.git","has_downloads":true,"watchers":15,"git_url":"git://github.com/jacquev6/PyGithub.git","deployments_url":"https://api.github.com/repos/jacquev6/PyGithub/deployments","releases_url":"https://api.github.com/repos/jacquev6/PyGithub/releases{/id}","updated_at":"2012-05-27T06:55:28Z","permissions":{"pull":true,"admin":true,"push":true},"homepage":"http://vincent-jacques.net/PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub","mirror_url":null,"has_pages":false,"has_wiki":false,"has_issues":true,"fork":false,"forks":3,"size":308,"private":false,"open_issues":16,"svn_url":"https://github.com/jacquev6/PyGithub","owner":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","language":"Python","description":"Python library implementing the full Github API v3","ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-27T06:00:28Z","created_at":"2012-02-25T12:53:47Z","id":3544490,"html_url":"https://github.com/jacquev6/PyGithub","full_name":"jacquev6/PyGithub"} diff --git a/tests/Repository.py b/tests/Repository.py index c7b69f08..c2d3f0c3 100644 --- a/tests/Repository.py +++ b/tests/Repository.py @@ -76,6 +76,15 @@ class Repository(Framework.TestCase): self.assertEqual(self.repo.git_url, "git://github.com/jacquev6/PyGithub.git") self.assertTrue(self.repo.has_downloads) self.assertTrue(self.repo.has_issues) + self.assertEqual( + self.repo.deployments_url, + "https://api.github.com/repos/jacquev6/PyGithub/deployments", + ) + self.assertFalse(self.repo.has_pages) + self.assertEqual( + self.repo.releases_url, + "https://api.github.com/repos/jacquev6/PyGithub/releases{/id}", + ) self.assertFalse(self.repo.has_wiki) self.assertEqual(self.repo.homepage, "http://vincent-jacques.net/PyGithub") self.assertEqual(self.repo.html_url, "https://github.com/jacquev6/PyGithub")