1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pythonOlder,
7 pytest,
8 pytest-asyncio,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "aresponses";
14 version = "2.1.6";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "CircleUp";
21 repo = pname;
22 rev = version;
23 hash = "sha256-Ui9ZpWaVBfCbDlZH3EgHX32FIZtyTHnc/UXqtoEyFcw=";
24 };
25
26 propagatedBuildInputs = [ aiohttp ];
27
28 buildInputs = [
29 pytest
30 pytest-asyncio
31 ];
32
33 nativeCheckInputs = [
34 aiohttp
35 pytest-asyncio
36 pytestCheckHook
37 ];
38
39 disabledTests = [
40 # Disable tests which requires network access
41 "test_foo"
42 "test_passthrough"
43 ];
44
45 __darwinAllowLocalNetworking = true;
46
47 pythonImportsCheck = [ "aresponses" ];
48
49 meta = with lib; {
50 description = "Asyncio testing server";
51 homepage = "https://github.com/circleup/aresponses";
52 license = licenses.mit;
53 maintainers = with maintainers; [ makefu ];
54 };
55}