From 2ac915631cbed54fe56a0d0659f6c0c557fd5966 Mon Sep 17 00:00:00 2001 From: "pooya.oa" Date: Mon, 16 Dec 2024 10:36:50 +0100 Subject: [PATCH] remove unused test codes. --- .../tests/test_controller.py | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/ckanext/dataset_reference/tests/test_controller.py b/ckanext/dataset_reference/tests/test_controller.py index 59e7b17..ad75bd3 100644 --- a/ckanext/dataset_reference/tests/test_controller.py +++ b/ckanext/dataset_reference/tests/test_controller.py @@ -20,36 +20,8 @@ class TestControllers(object): @pytest.fixture(autouse=True) def intial(self): - sysadmin_user = model.User.get("testsysadmin") - self.auth = {u"Authorization": str(sysadmin_user.apikey)} - - - - # @pytest.mark.usefixtures('clean_db', 'with_plugins', 'with_request_context') - # def test_add_reference_with_doi_when_doi_is_valid(self, app, migrate_db_for): - # ''' - # A user has to be able to add a reference - # with a doi url - # ''' - # # ctd.CreateTestData.create() - # migrate_db_for("dataset_reference") - # sysadmin_user = model.User.get("testsysadmin") - # owner_org = factories.Organization(users=[{ - # 'name': sysadmin_user.id, - # 'capacity': 'member' - # }]) - # dataset = factories.Dataset(owner_org=owner_org['id']) - # auth = {u"Authorization": str(sysadmin_user.apikey)} - # data = { - # 'package_id': dataset['id'], - # 'doi_or_bibtex': 'doi', - # 'doi': 'https://doi.org/10.1007/978-3-030-57717-9_36' - # } - # dest_url = h.url_for('dataset_reference.save_doi') - # response = app.post(dest_url, data=data, extra_environ=auth) - # assert response.status_code == 200 - # assert True == True - + pass + def test_doi_is_valid_call(self, app):