diff --git a/swh/indexer/tests/test_origin_head.py b/swh/indexer/tests/test_origin_head.py --- a/swh/indexer/tests/test_origin_head.py +++ b/swh/indexer/tests/test_origin_head.py @@ -4,6 +4,7 @@ # See top-level LICENSE file for more information import unittest +from datetime import datetime from swh.indexer.origin_head import OriginHeadIndexer from swh.indexer.tests.utils import ( @@ -56,7 +57,7 @@ 'url': origin_url, }) visit = self.indexer.storage.origin_visit_add( - origin_url, '2019-02-27', type='git', + origin_url, datetime(2019, 2, 27), type='git', ) self.indexer.storage.snapshot_add([{ 'id': b'foo', @@ -87,7 +88,7 @@ 'url': origin_url, }) visit = self.indexer.storage.origin_visit_add( - origin_url, '2019-02-27', type='pypi') + origin_url, datetime(2019, 2, 27), type='pypi') self.indexer.storage.snapshot_add([{ 'id': b'foo', 'branches': { diff --git a/swh/indexer/tests/utils.py b/swh/indexer/tests/utils.py --- a/swh/indexer/tests/utils.py +++ b/swh/indexer/tests/utils.py @@ -159,7 +159,7 @@ REVISIONS = [{ 'id': hash_to_bytes('8dbb6aeb036e7fd80664eb8bfd1507881af1ba9f'), - 'message': 'Improve search functionality', + 'message': b'Improve search functionality', 'author': { 'name': b'Andrew Nesbitt', 'fullname': b'Andrew Nesbitt ', @@ -171,11 +171,11 @@ 'email': b'andrewnez@gmail.com' }, 'committer_date': { - 'negative_utc': None, + 'negative_utc': False, 'offset': 120, 'timestamp': { 'microseconds': 0, - 'seconds': 1380883849 + 'seconds': 1380883849, } }, 'type': 'git', @@ -184,7 +184,7 @@ 'negative_utc': False, 'timestamp': { 'seconds': 1487596456, - 'microseconds': 0 + 'microseconds': 0, }, 'offset': 0 },