From 2dde972e0c66c104b180430e3dcb6c076680e16b Mon Sep 17 00:00:00 2001 From: Michael Gmelin Date: Mon, 12 Feb 2024 15:27:37 +0100 Subject: [PATCH] devel/py-pytest-httpx: New port Send responses to py-httpx using pytest --- devel/Makefile | 1 + devel/py-pytest-httpx/Makefile | 29 +++++++++++++++++++++++++++++ devel/py-pytest-httpx/distinfo | 3 +++ devel/py-pytest-httpx/pkg-descr | 4 ++++ 4 files changed, 37 insertions(+) create mode 100644 devel/py-pytest-httpx/Makefile create mode 100644 devel/py-pytest-httpx/distinfo create mode 100644 devel/py-pytest-httpx/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index 4b4b8840fe45b..00b47b2f905cc 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5408,6 +5408,7 @@ SUBDIR += py-pytest-html SUBDIR += py-pytest-httpbin SUBDIR += py-pytest-httpserver + SUBDIR += py-pytest-httpx SUBDIR += py-pytest-isort SUBDIR += py-pytest-jupyter SUBDIR += py-pytest-lazy-fixture diff --git a/devel/py-pytest-httpx/Makefile b/devel/py-pytest-httpx/Makefile new file mode 100644 index 0000000000000..7e8d5af8805ba --- /dev/null +++ b/devel/py-pytest-httpx/Makefile @@ -0,0 +1,29 @@ +PORTNAME= pytest-httpx +PORTVERSION= 0.29.0 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION} + +MAINTAINER= grembo@FreeBSD.org +COMMENT= Send responses to py-httpx using pytest +WWW= https://colin-b.github.io/pytest_httpx/ + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}httpx>0:www/py-httpx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0:devel/py-pytest-asyncio@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist distutils + +TEST_ENV= PYTHONPATH=${WRKSRC}/src + +NO_ARCH= yes + +do-test: + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts= + +.include diff --git a/devel/py-pytest-httpx/distinfo b/devel/py-pytest-httpx/distinfo new file mode 100644 index 0000000000000..94084ec8b9700 --- /dev/null +++ b/devel/py-pytest-httpx/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1707746509 +SHA256 (pytest_httpx-0.29.0.tar.gz) = ed08ed802e2b315b83cdd16f0b26cbb2b836c29e0fde5c18bc3105f1073e0332 +SIZE (pytest_httpx-0.29.0.tar.gz) = 34103 diff --git a/devel/py-pytest-httpx/pkg-descr b/devel/py-pytest-httpx/pkg-descr new file mode 100644 index 0000000000000..fd187bce1880d --- /dev/null +++ b/devel/py-pytest-httpx/pkg-descr @@ -0,0 +1,4 @@ +Send responses to HTTPX using pytest + +Once installed, httpx_mock fixture will make sure every httpx +request will be replied to with user provided responses.