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 assertions
  • Loading branch information
EnricoMi committed Jan 7, 2025
commit 3de0bda40cc1e22a65cfba41ecad69eb1df823ba
32 changes: 16 additions & 16 deletions tests/Deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +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.created_at, datetime(2020, 8, 26, 11, 44, 53, tzinfo=timezone.utc))
self.assertEqual(self.deployment.creator.login, 'jacquev6')
self.assertEqual(self.deployment.description, 'Test deployment')
self.assertEqual(self.deployment.environment, 'test')
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.assertIsNone(self.deployment.message)
self.assertEqual(self.deployment.node_id, 'MDEwOkRlcGxveW1lbnQyNjIzNTE3NzY=')
self.assertEqual(self.deployment.original_environment, 'test')
self.assertEqual(self.deployment.payload, {'test': True})
self.assertIsNone(self.deployment.performed_via_github_app)
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.ref, '743f5a58b0bce91c4eab744ff7e39dfca9e6e8a5')
self.assertEqual(self.deployment.repository_url, 'https://api.github.com/repos/jacquev6/PyGithub')
self.assertEqual(self.deployment.sha, '743f5a58b0bce91c4eab744ff7e39dfca9e6e8a5')
self.assertEqual(self.deployment.statuses_url, 'https://api.github.com/repos/jacquev6/PyGithub/deployments/263877258/statuses')
self.assertEqual(self.deployment.task, 'deploy')
self.assertEqual(self.deployment.transient_environment, True)
self.assertEqual(self.deployment.updated_at, datetime(2020, 8, 26, 11, 44, 53, tzinfo=timezone.utc))
self.assertEqual(
self.deployment.url,
"https://api.github.com/repos/jacquev6/PyGithub/deployments/263877258",
Expand Down