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 Deployment class with API spec #3121

Merged
merged 5 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 7, 2025
commit 93f89dae72503bb694aedad42dc428c238d0e02d
19 changes: 19 additions & 0 deletions tests/Deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
# #
################################################################################

from __future__ import annotations

from datetime import datetime, timezone

from . import Framework
Expand All @@ -45,7 +47,24 @@ def setUp(self):
self.deployment = self.g.get_user().get_repo("PyGithub").get_deployment(263877258)

def testAttributes(self):
self.assertEqual(self.deployment.created_at, datetime(2020, 1, 2, 12, 34, 56, tzinfo=timezone.utc))
self.assertEqual(self.deployment.creator.login, "")
self.assertEqual(self.deployment.description, "")
self.assertEqual(self.deployment.environment, "")
self.assertEqual(self.deployment.id, 263877258)
self.assertEqual(self.deployment.message, "")
self.assertEqual(self.deployment.node_id, "")
self.assertEqual(self.deployment.original_environment, "")
self.assertEqual(self.deployment.payload, None)
self.assertEqual(self.deployment.performed_via_github_app.id, "")
self.assertEqual(self.deployment.production_environment, False)
self.assertEqual(self.deployment.ref, "")
self.assertEqual(self.deployment.repository_url, "")
self.assertEqual(self.deployment.sha, "")
self.assertEqual(self.deployment.statuses_url, "")
self.assertEqual(self.deployment.task, "")
self.assertEqual(self.deployment.transient_environment, False)
self.assertEqual(self.deployment.updated_at, datetime(2020, 1, 2, 12, 34, 56, tzinfo=timezone.utc))
self.assertEqual(
self.deployment.url,
"https://api.github.com/repos/jacquev6/PyGithub/deployments/263877258",
Expand Down