self = <swh.indexer.tests.test_fossology_license.TestFossologyLicensePartitionIndexer testMethod=test__index_contents_with_indexed_data>
def test__index_contents_with_indexed_data(self):
"""Indexing contents with existing data results in less indexed data
"""
partition_id = 3
nb_partitions = 4
# first pass
actual_results = list(
self.indexer._index_contents(partition_id, nb_partitions, indexed={})
)
> self.assert_results_ok(partition_id, nb_partitions, actual_results)
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/utils.py:740:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.indexer.tests.test_fossology_license.TestFossologyLicensePartitionIndexer testMethod=test__index_contents_with_indexed_data>
partition_id = 3, nb_partitions = 4
actual_results = [{'id': b'\xa7\xab1M\x8a\x11\xd2\xc9>=\xcfR\x8c\xa2\x94\xe7\xb41\xc4I', 'indexer_configuration_id': 455672424825210276...\xfc%u\x91\xcc\x9b\xa1r$\x84"\x97\x80\xd1\xc6\x07', 'indexer_configuration_id': 4556724248252102765, 'licenses': None}]
def assert_results_ok(self, partition_id, nb_partitions, actual_results):
expected_ids = [
c.sha1
for c in stream_results(
self.indexer.storage.content_get_partition,
partition_id=partition_id,
nb_partitions=nb_partitions,
)
]
start, end = get_partition_bounds_bytes(partition_id, nb_partitions, SHA1_SIZE)
actual_results = list(actual_results)
for indexed_data in actual_results:
_id = indexed_data["id"]
assert isinstance(_id, bytes)
assert _id in expected_ids
> assert start <= _id
E AssertionError: assert b'\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' <= b'\xa7\xab1M\x8a\x11\xd2\xc9>=\xcfR\x8c\xa2\x94\xe7\xb41\xc4I'
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/utils.py:708: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Aug 20 2020, 12:18 PM