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
Update test assertions
  • Loading branch information
EnricoMi committed Jan 8, 2025
commit 49bb81cc8e99f06b8d316a33b76cd8c4ea2f7575
14 changes: 11 additions & 3 deletions tests/GithubApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,28 @@ def setUp(self):

def testAttributes(self):
app = self.app
self.assertIsNone(app.client_id)
self.assertEqual(app.client_id, "Iv1.05c79e9ad1f6bdfa")
self.assertIsNone(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(
app.events,
[
"branch_protection_rule",
"check_run",
"check_suite",
"create",
"delete",
"deployment",
"deployment_status",
"discussion",
"discussion_comment",
"fork",
"gollum",
"issues",
"issue_comment",
"label",
"merge_group",
"milestone",
"page_build",
"project",
Expand All @@ -87,17 +91,21 @@ def testAttributes(self):
self.assertEqual(app.id, 15368)
self.assertIsNone(app.installations_count)
self.assertEqual(app.name, "GitHub Actions")
self.assertEqual(app.node_id, 'MDM6QXBwMTUzNjg=')
self.assertEqual(app.node_id, "MDM6QXBwMTUzNjg=")
self.assertEqual(app.owner.login, "github")
self.assertIsNone(app.pem)
self.assertDictEqual(
app.permissions,
{
"actions": "write",
"administration": "read",
"attestations": "write",
"checks": "write",
"contents": "write",
"deployments": "write",
"discussions": "write",
"issues": "write",
"merge_queues": "write",
"metadata": "read",
"packages": "write",
"pages": "write",
Expand All @@ -110,7 +118,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.updated_at, datetime(2024, 4, 10, 20, 33, 16, tzinfo=timezone.utc))
self.assertEqual(app.url, "/apps/github-actions")
self.assertIsNone(app.webhook_secret)

Expand Down
Loading