Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync GithubApp class with API spec #3127

Merged
merged 7 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated test class according to API spec
  • Loading branch information
EnricoMi committed Jan 8, 2025
commit 1ba1c82b10d834f329ee797b73a43c0029b7dc4a
6 changes: 6 additions & 0 deletions tests/GithubApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def setUp(self):

def testAttributes(self):
app = self.app
self.assertEqual(app.client_id, "")
self.assertEqual(app.client_secret, "")
self.assertEqual(app.created_at, datetime(2018, 7, 30, 9, 30, 17, tzinfo=timezone.utc))
self.assertEqual(app.description, "Automate your workflow from idea to production")
self.assertListEqual(
Expand Down Expand Up @@ -83,8 +85,11 @@ def testAttributes(self):
self.assertEqual(app.external_url, "https://help.github.com/en/actions")
self.assertEqual(app.html_url, "https://github.com/apps/github-actions")
self.assertEqual(app.id, 15368)
self.assertEqual(app.installations_count, 0)
self.assertEqual(app.name, "GitHub Actions")
self.assertEqual(app.node_id, "")
self.assertEqual(app.owner.login, "github")
self.assertEqual(app.pem, "")
self.assertDictEqual(
app.permissions,
{
Expand All @@ -107,6 +112,7 @@ def testAttributes(self):
self.assertEqual(app.slug, "github-actions")
self.assertEqual(app.updated_at, datetime(2019, 12, 10, 19, 4, 12, tzinfo=timezone.utc))
self.assertEqual(app.url, "/apps/github-actions")
self.assertEqual(app.webhook_secret, "")

def testGetAuthenticatedApp(self):
auth = github.Auth.AppAuth(APP_ID, PRIVATE_KEY)
Expand Down