2019-07-24 00:00:32 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27
|
|
|
|
, aws-xray-sdk
|
|
|
|
, backports_tempfile
|
|
|
|
, boto
|
|
|
|
, boto3
|
|
|
|
, botocore
|
|
|
|
, cfn-lint
|
|
|
|
, docker
|
|
|
|
, flask
|
|
|
|
, freezegun
|
|
|
|
, jinja2
|
|
|
|
, jsondiff
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pyaml
|
|
|
|
, python-jose
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
, six
|
|
|
|
, sshpubkeys
|
|
|
|
, sure
|
|
|
|
, werkzeug
|
|
|
|
, xmltodict
|
|
|
|
}:
|
2017-09-15 14:15:54 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moto";
|
2019-07-24 00:00:32 +01:00
|
|
|
version = "1.3.10";
|
2017-12-30 11:24:45 +00:00
|
|
|
|
2017-09-15 14:15:54 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-07-24 00:00:32 +01:00
|
|
|
sha256 = "0vlq015irqqwdknk1an7qqkg1zjk18c7jd89r7zbxxfwy3bgzwwj";
|
2017-09-15 14:15:54 +01:00
|
|
|
};
|
|
|
|
|
2018-04-07 11:25:04 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2019-07-24 00:00:32 +01:00
|
|
|
--replace "jsondiff==1.1.2" "jsondiff~=1.1"
|
|
|
|
sed -i '/datetime/d' setup.py # should be taken care of by std library
|
2018-04-07 11:25:04 +01:00
|
|
|
'';
|
|
|
|
|
2017-09-15 14:15:54 +01:00
|
|
|
propagatedBuildInputs = [
|
2017-12-30 11:24:45 +00:00
|
|
|
aws-xray-sdk
|
2017-09-15 14:15:54 +01:00
|
|
|
boto
|
2017-12-30 11:24:45 +00:00
|
|
|
boto3
|
2019-07-24 00:00:32 +01:00
|
|
|
botocore
|
2019-05-01 09:59:56 +01:00
|
|
|
cfn-lint
|
2019-07-24 00:00:32 +01:00
|
|
|
docker
|
|
|
|
flask # required for server
|
2017-09-15 14:15:54 +01:00
|
|
|
jinja2
|
2019-07-24 00:00:32 +01:00
|
|
|
jsondiff
|
2017-12-30 11:24:45 +00:00
|
|
|
mock
|
|
|
|
pyaml
|
2018-08-30 18:09:45 +01:00
|
|
|
python-jose
|
2019-07-24 00:00:32 +01:00
|
|
|
pytz
|
|
|
|
six
|
|
|
|
requests
|
|
|
|
responses
|
|
|
|
sshpubkeys
|
|
|
|
werkzeug
|
|
|
|
xmltodict
|
|
|
|
] ++ lib.optionals isPy27 [ backports_tempfile ];
|
2017-09-15 14:15:54 +01:00
|
|
|
|
2019-07-24 00:00:32 +01:00
|
|
|
checkInputs = [ boto3 freezegun nose sure ];
|
2017-09-15 14:15:54 +01:00
|
|
|
|
2019-07-24 00:00:32 +01:00
|
|
|
checkPhase = ''nosetests -v ./tests/ \
|
|
|
|
-e test_invoke_function_from_sns \
|
|
|
|
-e test_invoke_requestresponse_function \
|
|
|
|
-e test_context_manager \
|
|
|
|
-e test_decorator_start_and_stop'';
|
2017-09-15 14:15:54 +01:00
|
|
|
|
2019-07-24 00:00:32 +01:00
|
|
|
meta = with lib; {
|
2019-07-25 09:47:10 +01:00
|
|
|
description = "Allows your tests to easily mock out AWS Services";
|
2019-07-24 00:00:32 +01:00
|
|
|
homepage = https://github.com/spulec/moto;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
2017-09-15 14:15:54 +01:00
|
|
|
}
|