gnu: Add python-aioresponses.
* gnu/packages/python-check.scm (python-aioresponses): New variable. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
This commit is contained in:
		
							parent
							
								
									af726a9bb4
								
							
						
					
					
						commit
						e769ff429b
					
				
					 1 changed files with 40 additions and 0 deletions
				
			
		| 
						 | 
					@ -1752,3 +1752,43 @@ or use cases.  Design is based on supporting slow, io-bound testing with often
 | 
				
			||||||
tedious system under test configuration that can benefit from running several
 | 
					tedious system under test configuration that can benefit from running several
 | 
				
			||||||
tests at one time.")
 | 
					tests at one time.")
 | 
				
			||||||
    (license license:expat)))
 | 
					    (license license:expat)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(define-public python-aioresponses
 | 
				
			||||||
 | 
					  (package
 | 
				
			||||||
 | 
					    (name "python-aioresponses")
 | 
				
			||||||
 | 
					    (version "0.7.2")
 | 
				
			||||||
 | 
					    (source
 | 
				
			||||||
 | 
					     (origin
 | 
				
			||||||
 | 
					       (method url-fetch)
 | 
				
			||||||
 | 
					       (uri (pypi-uri "aioresponses" version))
 | 
				
			||||||
 | 
					       (sha256
 | 
				
			||||||
 | 
					        (base32 "16p8mdyfirddrsay62ji7rwcrqmmzxzf2isdbfm9cj5p338rbr42"))))
 | 
				
			||||||
 | 
					    (build-system python-build-system)
 | 
				
			||||||
 | 
					    (arguments
 | 
				
			||||||
 | 
					     `(#:phases
 | 
				
			||||||
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
 | 
					         (replace 'check
 | 
				
			||||||
 | 
					           (lambda* (#:key tests? #:allow-other-keys)
 | 
				
			||||||
 | 
					             (when tests?
 | 
				
			||||||
 | 
					               (invoke
 | 
				
			||||||
 | 
					                "pytest" "-vv" "tests" "-k"
 | 
				
			||||||
 | 
					                (string-append
 | 
				
			||||||
 | 
					                 ;; These tests require network access.
 | 
				
			||||||
 | 
					                 "not test_address_as_instance_of_url_combined_with_pass_through "
 | 
				
			||||||
 | 
					                 "and not test_pass_through_with_origin_params"))))))))
 | 
				
			||||||
 | 
					    (native-inputs
 | 
				
			||||||
 | 
					     `(("python-pbr" ,python-pbr)
 | 
				
			||||||
 | 
					       ("python-ddt" ,python-ddt)
 | 
				
			||||||
 | 
					       ("python-pytest" ,python-pytest)))
 | 
				
			||||||
 | 
					    (propagated-inputs
 | 
				
			||||||
 | 
					     `(("python-aiohttp" ,python-aiohttp)))
 | 
				
			||||||
 | 
					    (home-page "https://github.com/pnuckowski/aioresponses")
 | 
				
			||||||
 | 
					    (synopsis "Mock out requests made by ClientSession from aiohttp package")
 | 
				
			||||||
 | 
					    (description
 | 
				
			||||||
 | 
					     "Aioresponses is a helper to mock/fake web requests in python aiohttp
 | 
				
			||||||
 | 
					package.  For requests module there are a lot of packages that help us with
 | 
				
			||||||
 | 
					testing (eg. httpretty, responses, requests-mock).  When it comes to testing
 | 
				
			||||||
 | 
					asynchronous HTTP requests it is a bit harder (at least at the beginning).
 | 
				
			||||||
 | 
					The purpose of this package is to provide an easy way to test asynchronous
 | 
				
			||||||
 | 
					HTTP requests.")
 | 
				
			||||||
 | 
					    (license license:expat)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue