Skip to content

Commit

Permalink
test: create ICAT related test fixtures #262 #263
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Bozhinov committed Dec 2, 2021
1 parent 5ab60de commit 2eb14cf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/search_api/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from icat.client import Client
from icat.query import Query
import pytest

from datagateway_api.src.common.config import config


@pytest.fixture(scope="package")
def icat_client():
client = Client(
config.search_api.icat_url, checkCert=config.search_api.icat_check_cert,
)
client.login(
config.test_mechanism, config.test_user_credentials.dict(),
)
return client


@pytest.fixture()
def icat_query(icat_client):
return Query(icat_client, "Investigation")

0 comments on commit 2eb14cf

Please sign in to comment.