Skip to content

Commit

Permalink
test: Fix test expectation for new default steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 11, 2024
1 parent 8220a48 commit 872266c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/extensions/test_kingfisher_process_api2.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ def test_from_crawler_with_database_url():
@pytest.mark.parametrize('note', [None, 'Started by NAME.'])
@pytest.mark.parametrize('job', [None, '7df53218f37a11eb80dd0c9d92c523cb'])
@pytest.mark.parametrize('ocds_version,upgrade', [('1.0', True), (None, False)])
@pytest.mark.parametrize('steps', [None, 'compile,check,invalid', 'compile', 'check'])
@pytest.mark.parametrize('steps,expected_steps', [
(None, ['compile']),
('compile,check,invalid', ['compile', 'check']),
('compile', ['compile']),
('check', ['check']),
])
@pytest.mark.parametrize('call_count,status_code,messages', [
(2, 200, [
('INFO', 'Created collection 1 in Kingfisher Process'), ('INFO', 'Closed collection 1 in Kingfisher Process')
Expand All @@ -149,6 +154,7 @@ def test_spider_opened(
ocds_version,
upgrade,
steps,
expected_steps,
call_count,
status_code,
messages,
Expand All @@ -174,8 +180,8 @@ def test_spider_opened(
'job': job,
'upgrade': upgrade,
}
if steps != 'check':
expected['compile'] = True
for step in expected_steps:
expected[step] = True

calls = mock.call_args_list

Expand Down

0 comments on commit 872266c

Please sign in to comment.