unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 53179@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#53179] [PATCH 3/3] gnu: Add python-pytest-httpx.
Date: Tue, 11 Jan 2022 05:24:29 +0000	[thread overview]
Message-ID: <20220111052429.34592-3-monego@posteo.net> (raw)
In-Reply-To: <20220111052429.34592-1-monego@posteo.net>

* gnu/packages/python-check.scm (python-pytest-httpx): New variable.
---
 gnu/packages/python-check.scm | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index b4e2765d72..da044b7acb 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
-;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
@@ -1735,6 +1735,38 @@ execution of a test suite.  It will also store a history of all test runs to
 help in debugging failures and optimizing the scheduler to improve speed.")
     (license license:asl2.0)))
 
+(define-public python-pytest-httpx
+  (package
+    (name "python-pytest-httpx")
+    (version "0.13.0")
+    (source
+     (origin
+       (method git-fetch)               ; no tests in PyPI release
+       (uri (git-reference
+             (url "https://github.com/Colin-b/pytest_httpx")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0lh7df3ysxmjzvx6242xb6qiwpfxrnj70kjmw5sndvzmy5dfpxfc"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs
+     (list python-httpx))
+    (native-inputs
+     (list python-pytest-asyncio python-pytest python-pytest-cov))
+    (home-page "https://colin-b.github.io/pytest_httpx/")
+    (synopsis "Pytest fixture to mock HTTPX")
+    (description "This package provides a Pytest fixture that will make sure
+every @code{httpx} request will be replied to with user provided responses.")
+    (license license:expat)))
+
 ;; This is only used by python-sanic
 (define-public python-pytest-sanic
   (package
-- 
2.30.2





  parent reply	other threads:[~2022-01-11  5:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  5:20 [bug#53179] [PATCH 0/3] Update httpx and add pytest-httpx Vinicius Monego
2022-01-11  5:24 ` [bug#53179] [PATCH 1/3] gnu: python-httpcore: Update to 0.13.7 Vinicius Monego
2022-01-11  5:24   ` [bug#53179] [PATCH 2/3] gnu: python-httpx: Update to 0.19.0 Vinicius Monego
2022-01-11  5:24   ` Vinicius Monego [this message]
2022-01-14 21:08 ` [bug#53179] [PATCH v2 1/3] gnu: python-httpcore: Update to 0.13.7 Vinicius Monego
2022-01-14 21:08   ` [bug#53179] [PATCH v2 2/3] gnu: python-httpx: Update to 0.19.0 Vinicius Monego
2022-01-14 21:08   ` [bug#53179] [PATCH v2 3/3] gnu: Add python-pytest-httpx Vinicius Monego
2022-06-22 16:11 ` bug#53179: [PATCH 0/3] Update httpx and add pytest-httpx Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220111052429.34592-3-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=53179@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).