From fa43e952688e8ad2d8808a849588e5460b029880 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Thu, 14 Mar 2013 12:31:36 +0100 Subject: [PATCH] Refactor XxxGithubObject --- github/AuthenticatedUser.py | 2 +- github/Authorization.py | 2 +- github/AuthorizationApplication.py | 2 +- github/Branch.py | 2 +- github/Commit.py | 2 +- github/CommitComment.py | 2 +- github/CommitStats.py | 2 +- github/CommitStatus.py | 2 +- github/Comparison.py | 2 +- github/ContentFile.py | 2 +- github/Download.py | 2 +- github/Event.py | 2 +- github/File.py | 2 +- github/Gist.py | 2 +- github/GistComment.py | 2 +- github/GistFile.py | 2 +- github/GistHistoryState.py | 2 +- github/GitAuthor.py | 2 +- github/GitBlob.py | 2 +- github/GitCommit.py | 2 +- github/GitObject.py | 2 +- github/GitRef.py | 2 +- github/GitTag.py | 2 +- github/GitTree.py | 2 +- github/GitTreeElement.py | 2 +- github/GithubObject.py | 14 ++++++++------ github/GitignoreTemplate.py | 2 +- github/Hook.py | 2 +- github/HookDescription.py | 2 +- github/HookResponse.py | 2 +- github/Issue.py | 2 +- github/IssueComment.py | 2 +- github/IssueEvent.py | 2 +- github/IssuePullRequest.py | 2 +- github/Label.py | 2 +- github/Milestone.py | 2 +- github/NamedUser.py | 2 +- github/Organization.py | 2 +- github/Permissions.py | 2 +- github/Plan.py | 2 +- github/PullRequest.py | 2 +- github/PullRequestComment.py | 2 +- github/PullRequestMergeStatus.py | 2 +- github/PullRequestPart.py | 2 +- github/Repository.py | 2 +- github/RepositoryKey.py | 4 ++-- github/Tag.py | 2 +- github/Team.py | 2 +- github/UserKey.py | 2 +- github/tests/Issue139.py | 4 ++-- github/tests/RawData.py | 6 +++--- 51 files changed, 62 insertions(+), 60 deletions(-) diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index 6665c669..9e01a059 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -27,7 +27,7 @@ import github.Event import github.Authorization -class AuthenticatedUser(github.GithubObject.GithubObject): +class AuthenticatedUser(github.GithubObject.CompletableGithubObject): """ This class represents AuthenticatedUsers as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Authorization.py b/github/Authorization.py index ab55c2f9..ed4b208b 100644 --- a/github/Authorization.py +++ b/github/Authorization.py @@ -18,7 +18,7 @@ import github.GithubObject import github.AuthorizationApplication -class Authorization(github.GithubObject.GithubObject): +class Authorization(github.GithubObject.CompletableGithubObject): """ This class represents Authorizations as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/AuthorizationApplication.py b/github/AuthorizationApplication.py index 1093635f..f6e7482d 100644 --- a/github/AuthorizationApplication.py +++ b/github/AuthorizationApplication.py @@ -16,7 +16,7 @@ import github.GithubObject -class AuthorizationApplication(github.GithubObject.GithubObject): +class AuthorizationApplication(github.GithubObject.CompletableGithubObject): """ This class represents AuthorizationApplications as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Branch.py b/github/Branch.py index 95e24c6d..e48e4d08 100644 --- a/github/Branch.py +++ b/github/Branch.py @@ -18,7 +18,7 @@ import github.GithubObject import github.Commit -class Branch(github.GithubObject.BasicGithubObject): +class Branch(github.GithubObject.NonCompletableGithubObject): """ This class represents Branchs as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Commit.py b/github/Commit.py index 7fd1e405..5657b23f 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -24,7 +24,7 @@ import github.CommitStats import github.CommitComment -class Commit(github.GithubObject.GithubObject): +class Commit(github.GithubObject.CompletableGithubObject): """ This class represents Commits as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/CommitComment.py b/github/CommitComment.py index 1d1e0e22..d73cd0b9 100644 --- a/github/CommitComment.py +++ b/github/CommitComment.py @@ -18,7 +18,7 @@ import github.GithubObject import github.NamedUser -class CommitComment(github.GithubObject.GithubObject): +class CommitComment(github.GithubObject.CompletableGithubObject): """ This class represents CommitComments as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/CommitStats.py b/github/CommitStats.py index 372c8c7f..1258255b 100644 --- a/github/CommitStats.py +++ b/github/CommitStats.py @@ -16,7 +16,7 @@ import github.GithubObject -class CommitStats(github.GithubObject.BasicGithubObject): +class CommitStats(github.GithubObject.NonCompletableGithubObject): """ This class represents CommitStatss as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/CommitStatus.py b/github/CommitStatus.py index 1d4533e2..8991d115 100644 --- a/github/CommitStatus.py +++ b/github/CommitStatus.py @@ -18,7 +18,7 @@ import github.GithubObject import github.NamedUser -class CommitStatus(github.GithubObject.BasicGithubObject): +class CommitStatus(github.GithubObject.NonCompletableGithubObject): """ This class represents CommitStatuss as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Comparison.py b/github/Comparison.py index 5a7c73fd..3816be8e 100644 --- a/github/Comparison.py +++ b/github/Comparison.py @@ -19,7 +19,7 @@ import github.Commit import github.File -class Comparison(github.GithubObject.GithubObject): +class Comparison(github.GithubObject.CompletableGithubObject): """ This class represents Comparisons as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/ContentFile.py b/github/ContentFile.py index 3fb12177..48e0a01e 100644 --- a/github/ContentFile.py +++ b/github/ContentFile.py @@ -16,7 +16,7 @@ import github.GithubObject -class ContentFile(github.GithubObject.GithubObject): +class ContentFile(github.GithubObject.CompletableGithubObject): """ This class represents ContentFiles as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Download.py b/github/Download.py index 29d038c8..2e577745 100644 --- a/github/Download.py +++ b/github/Download.py @@ -16,7 +16,7 @@ import github.GithubObject -class Download(github.GithubObject.GithubObject): +class Download(github.GithubObject.CompletableGithubObject): """ This class represents Downloads as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Event.py b/github/Event.py index 370cce01..42fe8b12 100644 --- a/github/Event.py +++ b/github/Event.py @@ -20,7 +20,7 @@ import github.Repository import github.NamedUser -class Event(github.GithubObject.BasicGithubObject): +class Event(github.GithubObject.NonCompletableGithubObject): """ This class represents Events as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/File.py b/github/File.py index 5406bece..51fc6414 100644 --- a/github/File.py +++ b/github/File.py @@ -16,7 +16,7 @@ import github.GithubObject -class File(github.GithubObject.BasicGithubObject): +class File(github.GithubObject.NonCompletableGithubObject): """ This class represents Files as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Gist.py b/github/Gist.py index f47e41e0..22bd6128 100644 --- a/github/Gist.py +++ b/github/Gist.py @@ -22,7 +22,7 @@ import github.GistFile import github.GistHistoryState -class Gist(github.GithubObject.GithubObject): +class Gist(github.GithubObject.CompletableGithubObject): """ This class represents Gists as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GistComment.py b/github/GistComment.py index a722a373..25d416e1 100644 --- a/github/GistComment.py +++ b/github/GistComment.py @@ -18,7 +18,7 @@ import github.GithubObject import github.NamedUser -class GistComment(github.GithubObject.GithubObject): +class GistComment(github.GithubObject.CompletableGithubObject): """ This class represents GistComments as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GistFile.py b/github/GistFile.py index 796b1acf..30892179 100644 --- a/github/GistFile.py +++ b/github/GistFile.py @@ -16,7 +16,7 @@ import github.GithubObject -class GistFile(github.GithubObject.BasicGithubObject): +class GistFile(github.GithubObject.NonCompletableGithubObject): """ This class represents GistFiles as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GistHistoryState.py b/github/GistHistoryState.py index 132f0726..0c89fc6c 100644 --- a/github/GistHistoryState.py +++ b/github/GistHistoryState.py @@ -19,7 +19,7 @@ import github.NamedUser import github.CommitStats -class GistHistoryState(github.GithubObject.GithubObject): +class GistHistoryState(github.GithubObject.CompletableGithubObject): """ This class represents GistHistoryStates as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitAuthor.py b/github/GitAuthor.py index 9dc39798..cb6b13a5 100644 --- a/github/GitAuthor.py +++ b/github/GitAuthor.py @@ -16,7 +16,7 @@ import github.GithubObject -class GitAuthor(github.GithubObject.BasicGithubObject): +class GitAuthor(github.GithubObject.NonCompletableGithubObject): """ This class represents GitAuthors as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitBlob.py b/github/GitBlob.py index 21c3c6c2..9b5c8b45 100644 --- a/github/GitBlob.py +++ b/github/GitBlob.py @@ -16,7 +16,7 @@ import github.GithubObject -class GitBlob(github.GithubObject.GithubObject): +class GitBlob(github.GithubObject.CompletableGithubObject): """ This class represents GitBlobs as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitCommit.py b/github/GitCommit.py index 391fe2d0..825cbd9d 100644 --- a/github/GitCommit.py +++ b/github/GitCommit.py @@ -19,7 +19,7 @@ import github.GitAuthor import github.GitTree -class GitCommit(github.GithubObject.GithubObject): +class GitCommit(github.GithubObject.CompletableGithubObject): """ This class represents GitCommits as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitObject.py b/github/GitObject.py index 6e5a4a9e..0bd5224c 100644 --- a/github/GitObject.py +++ b/github/GitObject.py @@ -16,7 +16,7 @@ import github.GithubObject -class GitObject(github.GithubObject.BasicGithubObject): +class GitObject(github.GithubObject.NonCompletableGithubObject): """ This class represents GitObjects as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitRef.py b/github/GitRef.py index 8daf11ae..4daa01cb 100644 --- a/github/GitRef.py +++ b/github/GitRef.py @@ -18,7 +18,7 @@ import github.GithubObject import github.GitObject -class GitRef(github.GithubObject.GithubObject): +class GitRef(github.GithubObject.CompletableGithubObject): """ This class represents GitRefs as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitTag.py b/github/GitTag.py index bf24ce37..0c952459 100644 --- a/github/GitTag.py +++ b/github/GitTag.py @@ -19,7 +19,7 @@ import github.GitAuthor import github.GitObject -class GitTag(github.GithubObject.GithubObject): +class GitTag(github.GithubObject.CompletableGithubObject): """ This class represents GitTags as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitTree.py b/github/GitTree.py index de293d84..8f755263 100644 --- a/github/GitTree.py +++ b/github/GitTree.py @@ -18,7 +18,7 @@ import github.GithubObject import github.GitTreeElement -class GitTree(github.GithubObject.GithubObject): +class GitTree(github.GithubObject.CompletableGithubObject): """ This class represents GitTrees as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GitTreeElement.py b/github/GitTreeElement.py index 48b9a023..75c73eab 100644 --- a/github/GitTreeElement.py +++ b/github/GitTreeElement.py @@ -16,7 +16,7 @@ import github.GithubObject -class GitTreeElement(github.GithubObject.BasicGithubObject): +class GitTreeElement(github.GithubObject.NonCompletableGithubObject): """ This class represents GitTreeElements as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/GithubObject.py b/github/GithubObject.py index 554c2228..adfe31c2 100644 --- a/github/GithubObject.py +++ b/github/GithubObject.py @@ -24,7 +24,7 @@ class _NotSetType: NotSet = _NotSetType() -class BasicGithubObject(object): +class GithubObject(object): def __init__(self, requester, attributes, completed): self._requester = requester self._initAttributes() @@ -42,9 +42,6 @@ class BasicGithubObject(object): self._completeIfNeeded() return self._rawData - def _completeIfNeeded(self): - pass - @staticmethod def _parentUrl(url): return "/".join(url.split("/")[: -1]) @@ -68,9 +65,14 @@ class BasicGithubObject(object): return datetime.datetime.strptime(s, "%Y-%m-%dT%H:%M:%SZ") -class GithubObject(BasicGithubObject): +class NonCompletableGithubObject(GithubObject): + def _completeIfNeeded(self): + pass + + +class CompletableGithubObject(GithubObject): def __init__(self, requester, attributes, completed): - BasicGithubObject.__init__(self, requester, attributes, completed) + GithubObject.__init__(self, requester, attributes, completed) self.__completed = completed def _completeIfNotSet(self, value): diff --git a/github/GitignoreTemplate.py b/github/GitignoreTemplate.py index 10b0b954..0ac378a6 100644 --- a/github/GitignoreTemplate.py +++ b/github/GitignoreTemplate.py @@ -16,7 +16,7 @@ import github.GithubObject -class GitignoreTemplate(github.GithubObject.BasicGithubObject): +class GitignoreTemplate(github.GithubObject.NonCompletableGithubObject): """ This class represents GitignoreTemplates as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Hook.py b/github/Hook.py index c39e18d9..c62eda2d 100644 --- a/github/Hook.py +++ b/github/Hook.py @@ -18,7 +18,7 @@ import github.GithubObject import github.HookResponse -class Hook(github.GithubObject.GithubObject): +class Hook(github.GithubObject.CompletableGithubObject): """ This class represents Hooks as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/HookDescription.py b/github/HookDescription.py index edf470e2..f8c4274c 100644 --- a/github/HookDescription.py +++ b/github/HookDescription.py @@ -16,7 +16,7 @@ import github.GithubObject -class HookDescription(github.GithubObject.BasicGithubObject): +class HookDescription(github.GithubObject.NonCompletableGithubObject): """ This class represents HookDescriptions as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/HookResponse.py b/github/HookResponse.py index 17829816..3d529d5d 100644 --- a/github/HookResponse.py +++ b/github/HookResponse.py @@ -16,7 +16,7 @@ import github.GithubObject -class HookResponse(github.GithubObject.BasicGithubObject): +class HookResponse(github.GithubObject.NonCompletableGithubObject): """ This class represents HookResponses as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Issue.py b/github/Issue.py index 01c8864c..26f3b7a5 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -25,7 +25,7 @@ import github.IssueComment import github.IssuePullRequest -class Issue(github.GithubObject.GithubObject): +class Issue(github.GithubObject.CompletableGithubObject): """ This class represents Issues as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/IssueComment.py b/github/IssueComment.py index f3e82ba4..26a772fb 100644 --- a/github/IssueComment.py +++ b/github/IssueComment.py @@ -18,7 +18,7 @@ import github.GithubObject import github.NamedUser -class IssueComment(github.GithubObject.GithubObject): +class IssueComment(github.GithubObject.CompletableGithubObject): """ This class represents IssueComments as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/IssueEvent.py b/github/IssueEvent.py index 44c6af8b..870f608b 100644 --- a/github/IssueEvent.py +++ b/github/IssueEvent.py @@ -19,7 +19,7 @@ import github.Issue import github.NamedUser -class IssueEvent(github.GithubObject.GithubObject): +class IssueEvent(github.GithubObject.CompletableGithubObject): """ This class represents IssueEvents as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/IssuePullRequest.py b/github/IssuePullRequest.py index 12c0e713..668f6d7f 100644 --- a/github/IssuePullRequest.py +++ b/github/IssuePullRequest.py @@ -16,7 +16,7 @@ import github.GithubObject -class IssuePullRequest(github.GithubObject.BasicGithubObject): +class IssuePullRequest(github.GithubObject.NonCompletableGithubObject): """ This class represents IssuePullRequests as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Label.py b/github/Label.py index 3106e40e..3c43825e 100644 --- a/github/Label.py +++ b/github/Label.py @@ -18,7 +18,7 @@ import urllib import github.GithubObject -class Label(github.GithubObject.GithubObject): +class Label(github.GithubObject.CompletableGithubObject): """ This class represents Labels as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Milestone.py b/github/Milestone.py index 01cb731e..9b726f2c 100644 --- a/github/Milestone.py +++ b/github/Milestone.py @@ -22,7 +22,7 @@ import github.NamedUser import github.Label -class Milestone(github.GithubObject.GithubObject): +class Milestone(github.GithubObject.CompletableGithubObject): """ This class represents Milestones as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/NamedUser.py b/github/NamedUser.py index 14c69395..f079080e 100644 --- a/github/NamedUser.py +++ b/github/NamedUser.py @@ -24,7 +24,7 @@ import github.Organization import github.Event -class NamedUser(github.GithubObject.GithubObject): +class NamedUser(github.GithubObject.CompletableGithubObject): """ This class represents NamedUsers as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Organization.py b/github/Organization.py index 02b37051..9672591c 100644 --- a/github/Organization.py +++ b/github/Organization.py @@ -23,7 +23,7 @@ import github.Repository import github.NamedUser -class Organization(github.GithubObject.GithubObject): +class Organization(github.GithubObject.CompletableGithubObject): """ This class represents Organizations as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Permissions.py b/github/Permissions.py index 11d2a4a9..1d11462e 100644 --- a/github/Permissions.py +++ b/github/Permissions.py @@ -16,7 +16,7 @@ import github.GithubObject -class Permissions(github.GithubObject.BasicGithubObject): +class Permissions(github.GithubObject.NonCompletableGithubObject): """ This class represents Permissionss as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Plan.py b/github/Plan.py index d609499f..15334a00 100644 --- a/github/Plan.py +++ b/github/Plan.py @@ -16,7 +16,7 @@ import github.GithubObject -class Plan(github.GithubObject.BasicGithubObject): +class Plan(github.GithubObject.NonCompletableGithubObject): """ This class represents Plans as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/PullRequest.py b/github/PullRequest.py index fddc225f..7a91f0ef 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -25,7 +25,7 @@ import github.IssueComment import github.Commit -class PullRequest(github.GithubObject.GithubObject): +class PullRequest(github.GithubObject.CompletableGithubObject): """ This class represents PullRequests as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/PullRequestComment.py b/github/PullRequestComment.py index bc5777d8..507cbd9c 100644 --- a/github/PullRequestComment.py +++ b/github/PullRequestComment.py @@ -18,7 +18,7 @@ import github.GithubObject import github.NamedUser -class PullRequestComment(github.GithubObject.GithubObject): +class PullRequestComment(github.GithubObject.CompletableGithubObject): """ This class represents PullRequestComments as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/PullRequestMergeStatus.py b/github/PullRequestMergeStatus.py index edb4a7b5..b6569e27 100644 --- a/github/PullRequestMergeStatus.py +++ b/github/PullRequestMergeStatus.py @@ -16,7 +16,7 @@ import github.GithubObject -class PullRequestMergeStatus(github.GithubObject.BasicGithubObject): +class PullRequestMergeStatus(github.GithubObject.NonCompletableGithubObject): """ This class represents PullRequestMergeStatuss as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/PullRequestPart.py b/github/PullRequestPart.py index 9a78e1bd..728cd41e 100644 --- a/github/PullRequestPart.py +++ b/github/PullRequestPart.py @@ -19,7 +19,7 @@ import github.Repository import github.NamedUser -class PullRequestPart(github.GithubObject.BasicGithubObject): +class PullRequestPart(github.GithubObject.NonCompletableGithubObject): """ This class represents PullRequestParts as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Repository.py b/github/Repository.py index 19518926..7baf15a2 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -47,7 +47,7 @@ import github.Event import github.Legacy -class Repository(github.GithubObject.GithubObject): +class Repository(github.GithubObject.CompletableGithubObject): """ This class represents Repositorys as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/RepositoryKey.py b/github/RepositoryKey.py index f5d19ca3..ef2e742c 100644 --- a/github/RepositoryKey.py +++ b/github/RepositoryKey.py @@ -16,13 +16,13 @@ import github.GithubObject -class RepositoryKey(github.GithubObject.GithubObject): +class RepositoryKey(github.GithubObject.CompletableGithubObject): """ This class represents RepositoryKeys as returned for example by http://developer.github.com/v3/todo """ def __init__(self, requester, attributes, completed, repoUrl): - github.GithubObject.GithubObject.__init__(self, requester, attributes, completed) + github.GithubObject.CompletableGithubObject.__init__(self, requester, attributes, completed) self.__repoUrl = repoUrl @property diff --git a/github/Tag.py b/github/Tag.py index 5f89cdfb..6a04a078 100644 --- a/github/Tag.py +++ b/github/Tag.py @@ -18,7 +18,7 @@ import github.GithubObject import github.Commit -class Tag(github.GithubObject.BasicGithubObject): +class Tag(github.GithubObject.NonCompletableGithubObject): """ This class represents Tags as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/Team.py b/github/Team.py index 5f2c20fd..a184794a 100644 --- a/github/Team.py +++ b/github/Team.py @@ -20,7 +20,7 @@ import github.Repository import github.NamedUser -class Team(github.GithubObject.GithubObject): +class Team(github.GithubObject.CompletableGithubObject): """ This class represents Teams as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/UserKey.py b/github/UserKey.py index 261fcfdc..e226153b 100644 --- a/github/UserKey.py +++ b/github/UserKey.py @@ -16,7 +16,7 @@ import github.GithubObject -class UserKey(github.GithubObject.GithubObject): +class UserKey(github.GithubObject.CompletableGithubObject): """ This class represents UserKeys as returned for example by http://developer.github.com/v3/todo """ diff --git a/github/tests/Issue139.py b/github/tests/Issue139.py index a3f46ec6..e06c002e 100644 --- a/github/tests/Issue139.py +++ b/github/tests/Issue139.py @@ -23,7 +23,7 @@ class Issue139(Framework.TestCase): # https://github.com/jacquev6/PyGithub/issu self.user = self.g.get_user().get_repo("PyGithub").get_issue(139).user def testCompletion(self): - self.assertFalse(self.user._GithubObject__completed) + self.assertFalse(self.user._CompletableGithubObject__completed) self.assertEqual(self.user.name, "Ian Ozsvald") - self.assertTrue(self.user._GithubObject__completed) + self.assertTrue(self.user._CompletableGithubObject__completed) self.assertEqual(self.user.plan, None) diff --git a/github/tests/RawData.py b/github/tests/RawData.py index dd950086..cd81dd35 100644 --- a/github/tests/RawData.py +++ b/github/tests/RawData.py @@ -68,14 +68,14 @@ class RawData(Framework.TestCase): def testCompletedObject(self): user = self.g.get_user("jacquev6") - self.assertTrue(user._GithubObject__completed) + self.assertTrue(user._CompletableGithubObject__completed) self.assertEqual(user.raw_data, RawData.jacquev6RawData) def testNotYetCompletedObject(self): user = self.g.get_user().get_repo("PyGithub").owner - self.assertFalse(user._GithubObject__completed) + self.assertFalse(user._CompletableGithubObject__completed) self.assertEqual(user.raw_data, RawData.jacquev6RawData) - self.assertTrue(user._GithubObject__completed) + self.assertTrue(user._CompletableGithubObject__completed) def testNonCompletableObject(self): plan = self.g.get_user().plan