Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346144
D2919.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D2919.diff
View Options
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 <andrewnez@gmail.com>',
@@ -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
},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:46 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218375
Attached To
D2919: test: make test data properly typed
Event Timeline
Log In to Comment