Skip to content

Commit 1a37e04

Browse files
committed
tests: add 'with_request_context' for non-auth tests
1 parent 827bb51 commit 1a37e04

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ckanext/dc_serve/tests/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
@pytest.mark.ckan_config('ckan.plugins', 'dcor_depot dcor_schemas dc_serve')
15-
@pytest.mark.usefixtures('clean_db')
15+
@pytest.mark.usefixtures('clean_db', 'with_request_context')
1616
@mock.patch('ckan.plugins.toolkit.enqueue_job',
1717
side_effect=synchronous_enqueue_job)
1818
def test_get_dc_instance_s3(enqueue_job_mock):

ckanext/dc_serve/tests/test_jobs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# We need the dcor_depot extension to make sure that the symbolic-
3030
# linking pipeline is used.
3131
@pytest.mark.ckan_config('ckan.plugins', 'dcor_depot dcor_schemas dc_serve')
32-
@pytest.mark.usefixtures('clean_db')
32+
@pytest.mark.usefixtures('clean_db', 'with_request_context')
3333
@mock.patch('ckan.plugins.toolkit.enqueue_job',
3434
side_effect=synchronous_enqueue_job)
3535
def test_create_condensed_dataset_job_upload_s3(enqueue_job_mock, tmp_path):
@@ -73,7 +73,7 @@ def test_create_condensed_dataset_job_upload_s3(enqueue_job_mock, tmp_path):
7373
# linking pipeline is used.
7474
@pytest.mark.ckan_config('ckan.plugins', 'dcor_depot dcor_schemas dc_serve')
7575
@pytest.mark.ckan_config('ckanext.dc_serve.create_condensed_datasets', "false")
76-
@pytest.mark.usefixtures('clean_db')
76+
@pytest.mark.usefixtures('clean_db', 'with_request_context')
7777
@mock.patch('ckan.plugins.toolkit.enqueue_job',
7878
side_effect=synchronous_enqueue_job)
7979
def test_do_not_create_condensed_by_config_dataset_job_upload_s3(
@@ -96,7 +96,7 @@ def test_do_not_create_condensed_by_config_dataset_job_upload_s3(
9696
# We need the dcor_depot extension to make sure that the symbolic-
9797
# linking pipeline is used.
9898
@pytest.mark.ckan_config('ckan.plugins', 'dcor_depot dcor_schemas dc_serve')
99-
@pytest.mark.usefixtures('clean_db')
99+
@pytest.mark.usefixtures('clean_db', 'with_request_context')
100100
@mock.patch('ckan.plugins.toolkit.enqueue_job',
101101
side_effect=synchronous_enqueue_job)
102102
def test_upload_condensed_dataset_to_s3_job_and_verify_basin(

0 commit comments

Comments
 (0)