diff --git a/.test.env b/.test.env deleted file mode 100644 index 94a18955..00000000 --- a/.test.env +++ /dev/null @@ -1,9 +0,0 @@ -DATASTORE_DIR=tests/resources/datastores/TEST_DATASTORE -DATASTORE_RDN=no.ssb.test -PSEUDONYM_SERVICE_URL=http://mock.pseudonym.service -DATASTORE_API_URL=http://mock.job.service -NUMBER_OF_WORKERS=4 -SECRETS_FILE=tests/resources/secrets/secrets.json -DOCKER_HOST_NAME=localhost -COMMIT_ID=abc123 -MAX_GB_ALL_WORKERS=50 diff --git a/pyproject.toml b/pyproject.toml index 499c41a1..2c53f941 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,6 @@ dependencies = [ dev = [ "pre-commit>=4.3.0", "pytest>=8.0.1,<9", - "pytest-dotenv>=0.5.2,<0.6", "pytest-cov>=6.0.0,<7", "requests-mock>=1.9.3,<2", "pytest-mock>=3.8.2,<4", diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000..eaebce75 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,11 @@ +import os + +os.environ["DATASTORE_DIR"] = "tests/resources/datastores/TEST_DATASTORE" +os.environ["DATASTORE_RDN"] = "no.ssb.test" +os.environ["PSEUDONYM_SERVICE_URL"] = "http://mock.pseudonym.service" +os.environ["DATASTORE_API_URL"] = "http://mock.job.service" +os.environ["NUMBER_OF_WORKERS"] = "4" +os.environ["SECRETS_FILE"] = "tests/resources/secrets/secrets.json" +os.environ["DOCKER_HOST_NAME"] = "localhost" +os.environ["COMMIT_ID"] = "abc123" +os.environ["MAX_GB_ALL_WORKERS"] = "50" diff --git a/uv.lock b/uv.lock index 847a72a1..d1864415 100644 --- a/uv.lock +++ b/uv.lock @@ -265,7 +265,6 @@ dev = [ { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-cov" }, - { name = "pytest-dotenv" }, { name = "pytest-mock" }, { name = "requests-mock" }, { name = "ruff" }, @@ -286,7 +285,6 @@ dev = [ { name = "pre-commit", specifier = ">=4.3.0" }, { name = "pytest", specifier = ">=8.0.1,<9" }, { name = "pytest-cov", specifier = ">=6.0.0,<7" }, - { name = "pytest-dotenv", specifier = ">=0.5.2,<0.6" }, { name = "pytest-mock", specifier = ">=3.8.2,<4" }, { name = "requests-mock", specifier = ">=1.9.3,<2" }, { name = "ruff", specifier = ">=0.11.0,<0.12" }, @@ -551,19 +549,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/bc/16/4ea354101abb1287856baa4af2732be351c7bee728065aed451b678153fd/pytest_cov-6.2.1-py3-none-any.whl", hash = "sha256:f5bc4c23f42f1cdd23c70b1dab1bbaef4fc505ba950d53e0081d0730dd7e86d5", size = 24644, upload-time = "2025-06-12T10:47:45.932Z" }, ] -[[package]] -name = "pytest-dotenv" -version = "0.5.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pytest" }, - { name = "python-dotenv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/cd/b0/cafee9c627c1bae228eb07c9977f679b3a7cb111b488307ab9594ba9e4da/pytest-dotenv-0.5.2.tar.gz", hash = "sha256:2dc6c3ac6d8764c71c6d2804e902d0ff810fa19692e95fe138aefc9b1aa73732", size = 3782, upload-time = "2020-06-16T12:38:03.4Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d0/da/9da67c67b3d0963160e3d2cbc7c38b6fae342670cc8e6d5936644b2cf944/pytest_dotenv-0.5.2-py3-none-any.whl", hash = "sha256:40a2cece120a213898afaa5407673f6bd924b1fa7eafce6bda0e8abffe2f710f", size = 3993, upload-time = "2020-06-16T12:38:01.139Z" }, -] - [[package]] name = "pytest-mock" version = "3.14.1" @@ -588,15 +573,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, ] -[[package]] -name = "python-dotenv" -version = "1.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/b0/4bc07ccd3572a2f9df7e6782f52b0c6c90dcbb803ac4a167702d7d0dfe1e/python_dotenv-1.1.1.tar.gz", hash = "sha256:a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab", size = 41978, upload-time = "2025-06-24T04:21:07.341Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5f/ed/539768cf28c661b5b068d66d96a2f155c4971a5d55684a514c1a0e0dec2f/python_dotenv-1.1.1-py3-none-any.whl", hash = "sha256:31f23644fe2602f88ff55e1f5c79ba497e01224ee7737937930c448e4d0e24dc", size = 20556, upload-time = "2025-06-24T04:21:06.073Z" }, -] - [[package]] name = "pytz" version = "2025.2"