From f7422be3dfc4c3de6dc8f44727705ee3bcbf0374 Mon Sep 17 00:00:00 2001 From: Jari-Pekka Voutilainen Date: Fri, 8 Dec 2023 13:47:17 +0200 Subject: [PATCH] plugins are defined in test.ini --- .../xroad_integration/tests/test_plugin.py | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/ckanext/xroad_integration/tests/test_plugin.py b/ckanext/xroad_integration/tests/test_plugin.py index 0bd78e1..38a4321 100644 --- a/ckanext/xroad_integration/tests/test_plugin.py +++ b/ckanext/xroad_integration/tests/test_plugin.py @@ -18,7 +18,6 @@ @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'harvest xroad_harvester') def test_base(xroad_rest_adapter_mocks): results = run_harvest( @@ -48,7 +47,6 @@ def test_base(xroad_rest_adapter_mocks): @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'harvest xroad_harvester') def test_base_twice(xroad_rest_adapter_mocks): harvester = XRoadHarvesterPlugin() url = xroad_rest_adapter_url('base') @@ -58,8 +56,6 @@ def test_base_twice(xroad_rest_adapter_mocks): @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'apicatalog scheming_datasets scheming_organizations fluent harvest ' - 'xroad_harvester xroad_integration') def test_delete(xroad_rest_adapter_mocks): harvester = XRoadHarvesterPlugin() run_harvest(url=xroad_rest_adapter_url('base'), harvester=harvester) @@ -95,7 +91,6 @@ def test_delete(xroad_rest_adapter_mocks): @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'harvest xroad_harvester') def test_listmembers_on_error(xroad_rest_adapter_mocks): harvester = XRoadHarvesterPlugin() results = run_harvest(url=xroad_rest_adapter_url('listmembers_error'), harvester=harvester) @@ -108,8 +103,6 @@ def test_listmembers_on_error(xroad_rest_adapter_mocks): @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'apicatalog scheming_datasets scheming_organizations fluent harvest ' - 'xroad_harvester xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('get_list_errors_data')) def test_xroad_errors(xroad_rest_adapter_mocks, xroad_rest_mocks, migrate_db_for): @@ -135,7 +128,6 @@ def test_xroad_errors(xroad_rest_adapter_mocks, xroad_rest_mocks, migrate_db_for @pytest.mark.freeze_time('2023-01-17') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_list_xroad_errors_for_organization(migrate_db_for): migrate_db_for('xroad_integration') @@ -168,7 +160,6 @@ def test_list_xroad_errors_for_organization(migrate_db_for): @pytest.mark.freeze_time('2023-01-17') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') def test_view_xroad_errors_for_organization(migrate_db_for, app): migrate_db_for('xroad_integration') @@ -200,7 +191,6 @@ def test_view_xroad_errors_for_organization(migrate_db_for, app): @pytest.mark.freeze_time('2022-01-02') @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getListOfServices')) def test_fetch_xroad_service_list(xroad_rest_mocks, xroad_database_setup): result = call_action('fetch_xroad_service_list') @@ -254,7 +244,6 @@ def test_fetch_xroad_service_list(xroad_rest_mocks, xroad_database_setup): ] ) @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getListOfServices')) def test_fetch_xroad_service_list_with_date_ranges(xroad_rest_mocks, @@ -265,7 +254,6 @@ def test_fetch_xroad_service_list_with_date_ranges(xroad_rest_mocks, @pytest.mark.freeze_time('2022-01-02') @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getServiceStatistics')) def test_fetch_xroad_service_statistics(xroad_rest_mocks, xroad_database_setup): result = call_action('fetch_xroad_stats') @@ -314,7 +302,6 @@ def test_fetch_xroad_service_statistics(xroad_rest_mocks, xroad_database_setup): ] ) @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getServiceStatistics')) def test_fetch_xroad_service_statistics_with_date_ranges(xroad_rest_mocks, @@ -325,7 +312,6 @@ def test_fetch_xroad_service_statistics_with_date_ranges(xroad_rest_mocks, @pytest.mark.freeze_time('2022-01-02') @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getDistinctServiceStatistics')) def test_fetch_xroad_distinct_service_statistics(xroad_rest_mocks, xroad_database_setup): @@ -373,7 +359,6 @@ def test_fetch_xroad_distinct_service_statistics(xroad_rest_mocks, xroad_databas ] ) @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getDistinctServiceStatistics')) def test_fetch_xroad_distinct_service_statistics_with_date_ranges(xroad_rest_mocks, @@ -383,7 +368,6 @@ def test_fetch_xroad_distinct_service_statistics_with_date_ranges(xroad_rest_moc @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index', 'xroad_database_setup') -@pytest.mark.ckan_config('ckan.plugins', 'xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('heartbeat')) def test_xroad_heartbeat(xroad_rest_mocks): result = call_action('fetch_xroad_heartbeat') @@ -392,8 +376,6 @@ def test_xroad_heartbeat(xroad_rest_mocks): @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index', 'xroad_database_setup') -@pytest.mark.ckan_config('ckan.plugins', 'apicatalog scheming_datasets scheming_organizations fluent harvest ' - 'xroad_harvester xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getOrganizationOrganizationData')) def test_xroad_get_organizations_organization_data(xroad_rest_mocks): @@ -420,8 +402,6 @@ def test_xroad_get_organizations_organization_data(xroad_rest_mocks): @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index', 'xroad_database_setup') -@pytest.mark.ckan_config('ckan.plugins', 'apicatalog scheming_datasets scheming_organizations fluent harvest ' - 'xroad_harvester xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getOrganizationCompanyData')) def test_xroad_get_organizations_company_data(xroad_rest_adapter_mocks, xroad_rest_mocks): @@ -445,8 +425,6 @@ def test_xroad_get_organizations_company_data(xroad_rest_adapter_mocks, xroad_re @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index', 'xroad_database_setup') -@pytest.mark.ckan_config('ckan.plugins', 'apicatalog scheming_datasets scheming_organizations fluent harvest ' - 'xroad_harvester xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getOrganizationCompanyDataWithBusinessIdChanges')) def test_xroad_get_organizations_company_data_with_business_id_changes(xroad_rest_adapter_mocks, xroad_rest_mocks): @@ -463,8 +441,6 @@ def test_xroad_get_organizations_company_data_with_business_id_changes(xroad_res @pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index', 'xroad_database_setup') -@pytest.mark.ckan_config('ckan.plugins', 'apicatalog scheming_datasets scheming_organizations fluent harvest ' - 'xroad_harvester xroad_integration') @pytest.mark.ckan_config('ckanext.xroad_integration.xroad_catalog_address', xroad_rest_service_url('getOrganizationEmptyData')) def test_xroad_get_organizations_empty_data(xroad_rest_adapter_mocks, xroad_rest_mocks): harvester = XRoadHarvesterPlugin()