diff --git a/github/GitRelease.py b/github/GitRelease.py index 831337a3..427dc8ea 100644 --- a/github/GitRelease.py +++ b/github/GitRelease.py @@ -37,7 +37,7 @@ from os.path import basename import github.GithubObject -import github.GitAuthor +import github.NamedUser import github.GitReleaseAsset @@ -108,7 +108,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject): @property def author(self): """ - :type: :class:`github.GitAuthor.GitAuthor` + :type: :class:`github.NamedUser.NamedUser` """ self._completeIfNotSet(self._author) return self._author.value @@ -285,7 +285,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject): if "prerelease" in attributes: self._prerelease = self._makeBoolAttribute(attributes["prerelease"]) if "author" in attributes: - self._author = self._makeClassAttribute(github.GitAuthor.GitAuthor, attributes["author"]) + self._author = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["author"]) if "url" in attributes: self._url = self._makeStringAttribute(attributes["url"]) if "upload_url" in attributes: diff --git a/github/tests/GitRelease.py b/github/tests/GitRelease.py index 18a7a4a6..d6ab7bb4 100644 --- a/github/tests/GitRelease.py +++ b/github/tests/GitRelease.py @@ -73,6 +73,9 @@ class Release(Framework.TestCase): self.assertEqual(self.release.prerelease, False) self.assertEqual(self.release.url, "https://api.github.com/repos/edhollandAL/PyGithub/releases/1210814") self.assertEqual(self.release.author._rawData['login'], "edhollandAL") + self.assertEqual(self.release.author.login, "edhollandAL") + self.assertEqual(self.release.author.id, 11922660) + self.assertEqual(self.release.author.type, "User") self.assertEqual(self.release.html_url, "https://github.com/edhollandAL/PyGithub/releases/tag/v1.25.2") self.assertEqual(self.release.created_at, datetime.datetime(2014, 10, 8, 1, 54)) self.assertEqual(self.release.published_at, datetime.datetime(2015, 4, 24, 8, 36, 51))