[github] strip the final 'Z' of the date and update the test
This commit is contained in:
parent
3c97b5c693
commit
9df0bb5433
|
@ -39,5 +39,5 @@ def _github_done(name, use_latest_release, use_max_tag, ignored_tags, callback,
|
|||
else:
|
||||
# YYYYMMDD.HHMMSS
|
||||
version = data[0]['commit']['committer']['date'] \
|
||||
.replace('-', '').replace(':', '').replace('T', '.')
|
||||
.rstrip('Z').replace('-', '').replace(':', '').replace('T', '.')
|
||||
callback(name, version)
|
||||
|
|
|
@ -7,7 +7,7 @@ from tests.helper import ExternalVersionTestCase
|
|||
reason="requires NVCHECKER_GITHUB_TOKEN, or it fails too much")
|
||||
class GitHubTest(ExternalVersionTestCase):
|
||||
def test_github(self):
|
||||
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo"}), "20140122")
|
||||
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo"}), "20140122.012101")
|
||||
|
||||
def test_github_latest_release(self):
|
||||
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_latest_release": 1}), "release3")
|
||||
|
|
Loading…
Reference in New Issue