Skip to content

Commit

Permalink
devel/py-pytest-httpx: New port
Browse files Browse the repository at this point in the history
Send responses to py-httpx using pytest
  • Loading branch information
grembo committed Feb 18, 2024
1 parent 7f2d71c commit 2dde972
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions 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 <bsd.port.mk>
3 changes: 3 additions & 0 deletions 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
4 changes: 4 additions & 0 deletions 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.

0 comments on commit 2dde972

Please sign in to comment.