MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testMakeTimestampAttribute

Method testMakeTimestampAttribute

tests/GithubObject.py:226–233  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

224 self.assertIsNone(e.exception.transformation_exception)
225
226 def testMakeTimestampAttribute(self):
227 actual = gho.GithubObject._makeTimestampAttribute(None)
228 self.assertEqual(gho._ValuedAttribute, type(actual))
229 self.assertIsNone(actual.value)
230
231 actual = gho.GithubObject._makeTimestampAttribute(1611405296)
232 self.assertEqual(gho._ValuedAttribute, type(actual))
233 self.assertEqual(datetime(2021, 1, 23, 12, 34, 56, tzinfo=timezone.utc), actual.value)
234
235 def testMakeTimetsampAttributeBadValues(self):
236 for value in ["1611405296", 1234.567]:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected