Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yolile committed Jul 13, 2023
1 parent 4e0dfd4 commit 119ff84
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/extensions/test_database_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ def test_spider_closed_warnings(caplog, tmpdir):
'Replacing the JSON data in the test table',
]

assert [record.message.message for record in records] == [
("Multiple objects have the `id` value 'x' in the `parties` array"),
("Multiple objects have the `id` value 'z' in the `parties` array"),
assert [record.message for record in records] == [
("x: Multiple objects have the `id` value 'x' in the `parties` array"),
("z: Multiple objects have the `id` value 'z' in the `parties` array"),
]


Expand All @@ -155,7 +155,8 @@ def test_spider_closed_warnings(caplog, tmpdir):
(b'{"releases": [{"date": "2021-05-26T10:00:00Z"}]}', 'release_package', 1, False, None),
(b'{"releases": [{"ocid":"1", "date": "2021-05-26T10:00:00Z"}]}', 'release_package', None, True, None),
(b'{"records": [{"compiledRelease": {"date": "2021-05-26T10:00:00Z"}}]}', 'record_package', None, False, None),
(b'{"records": [{"releases": [{"ocid":"1", "date": "2021-05-26T10:00:00Z"}]}]}', 'record_package', None, True, None),
(b'{"records": [{"releases": [{"ocid":"1", "date": "2021-05-26T10:00:00Z"}]}]}', 'record_package', None, True,
None),
])
def test_spider_closed(cursor, caplog, tmpdir, data, data_type, sample, compile_releases, table_name):
spider = spider_with_crawler(crawl_time='2021-05-25T00:00:00',
Expand Down

0 comments on commit 119ff84

Please sign in to comment.