Skip to content

Commit

Permalink
Tests should work now?
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Apr 8, 2024
1 parent ba323d6 commit 58f9d73
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 28 deletions.
12 changes: 6 additions & 6 deletions tests/Commit.py
Expand Up @@ -40,31 +40,31 @@
class Commit(Framework.TestCase):
def setUp(self):
super().setUp()
self.commit = self.g.get_user("jacquev6").get_repo("PyGithub").get_commit("1292bf0e22c796e91cc3d6e24b544aece8c21f2a")
self.commit = self.g.get_user().get_repo("PyGithub").get_commit("1292bf0e22c796e91cc3d6e24b544aece8c21f2a")
self.commit.author.login # to force lazy completion

def testAttributes(self):
self.assertEqual(self.commit.author.login, "jacquev6")
self.assertEqual(
self.commit.commit.url,
"https://api.github.com/repos/PyGithub/PyGithub/git/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a",
"https://api.github.com/repos/jacquev6/PyGithub/git/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a",
)
self.assertEqual(self.commit.committer.login, "jacquev6")
self.assertEqual(self.commit.files.totalCount, 1)
self.assertEqual(self.commit.files[0].additions, 0)
self.assertEqual(
self.commit.files[0].blob_url,
"https://github.com/PyGithub/PyGithub/blob/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/github%2FGithubObjects%2FGitAuthor.py",
"https://github.com/jacquev6/PyGithub/blob/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/github/GithubObjects/GitAuthor.py",
)
self.assertEqual(self.commit.files[0].changes, 20)
self.assertEqual(self.commit.files[0].deletions, 20)
self.assertEqual(self.commit.files[0].filename, "github/GithubObjects/GitAuthor.py")
self.assertTrue(isinstance(self.commit.files[0].patch, str))
self.assertEqual(
self.commit.files[0].raw_url,
"https://github.com/PyGithub/PyGithub/raw/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/github%2FGithubObjects%2FGitAuthor.py",
"https://github.com/jacquev6/PyGithub/raw/1292bf0e22c796e91cc3d6e24b544aece8c21f2a/github/GithubObjects/GitAuthor.py",
)
self.assertEqual(self.commit.files[0].sha, "ca6a3c616fc1367b6d01d04a7cf6ee27cf216f26")
self.assertEqual(self.commit.files[0].sha, "1292bf0e22c796e91cc3d6e24b544aece8c21f2a")
self.assertEqual(self.commit.files[0].status, "modified")
self.assertEqual(len(self.commit.parents), 1)
self.assertEqual(self.commit.parents[0].sha, "b46ed0dfde5ad02d3b91eb54a41c5ed960710eae")
Expand All @@ -74,7 +74,7 @@ def testAttributes(self):
self.assertEqual(self.commit.stats.total, 20)
self.assertEqual(
self.commit.url,
"https://api.github.com/repos/PyGithub/PyGithub/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a",
"https://api.github.com/repos/jacquev6/PyGithub/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a",
)
self.assertEqual(self.commit.commit.tree.sha, "4c6bd50994f0f9823f898b1c6c964ad7d4fa11ab")
self.assertEqual(
Expand Down

0 comments on commit 58f9d73

Please sign in to comment.