@@ -7,17 +7,16 @@
77, aiohttp
88, androguard
99, azure-identity
10−, azure-keyvault-keys
11−, azure-keyvault-secrets
10+, azure-keyvault
1211, azure-mgmt-compute
1312, azure-mgmt-keyvault
1413, azure-mgmt-network
1514, azure-mgmt-resource
1615, azure-mgmt-security
1716, azure-mgmt-storage
17+, azure-mgmt-sql
1818, azure-mgmt-web
19−, azure-storage-file
20−, azure-storage-file-share
19+, azure-storage
2120, bandit
2221, bcrypt
2322, beautifulsoup4
@@ -45,11 +44,14 @@
4544, pyhcl
4645, pyjks
4746, pynacl
47+, pyodbc
4848, pyopenssl
4949, pypdf2
5050, pysmb
51+, pytesseract
5152, python_magic
5253, pytz
54+, pywinrm
5355, requirements-detector
5456, selenium
5557, tlslite-ng
@@ -57,35 +59,30 @@
5759
5860# pythonPackages to test the derivation
5961, pytest
62+, flask
63+, flask-httpauth
64+, docker
6065}:
6166
6267buildPythonPackage rec {
6368 pname = "fluidasserts";
64− version = "20.1.33141";
69+ version = "20.2.30165";
6570 disabled = !isPy37;
6671
6772 src = fetchPypi {
6873 inherit pname version;
69− extension = "zip";
70− sha256 = "01l6yb3r19q8b4kwqkrzn7mpfsr65zsgzax2fbs43hb6pq6vavnx";
74+ sha256 = "0wcplzfx89d3c6hvdgag860sl3infqmymy6ly6y6ah77pkc98x15";
7175 };
7276
7377 patchPhase = ''
74− # Version mismatches between current FluidAsserts and Nixpkgs
75− substituteInPlace ./setup.py \
76− --replace 'tlslite-ng==0.8.0-alpha36' 'tlslite-ng==0.7.5' \
77− --replace 'boto3==1.11.7' 'boto3==1.10.1' \
78− --replace 'typed-ast==1.4.1' 'typed-ast==1.4.0' \
79− --replace 'pillow==7.0.0' 'pillow==6.2.1' \
78+ # Release packages from their hard pinned versions
79+ sed -i -E "s/(.*)==.*/\1/g" requirements.txt
8080
8181 # Functionality that will be not present for the momment
8282 # but that we'll work to add in the future
8383 # Just a minimal portion of fluidasserts use this
84− substituteInPlace ./setup.py \
85− --replace "'pymssql==2.1.4'," "" \
86− --replace "'pytesseract==0.3.1'," "" \
87− --replace "'pywinrm==0.4.1'," "" \
88− --replace "'mitmproxy==5.0.1'," "" \
84+ substituteInPlace ./requirements.txt \
85+ --replace "mitmproxy" "" \
8986
9087 '';
9188
@@ -94,17 +91,16 @@ buildPythonPackage rec {
9491 aiohttp
9592 androguard
9693 azure-identity
97− azure-keyvault-keys
98− azure-keyvault-secrets
94+ azure-keyvault
9995 azure-mgmt-compute
10096 azure-mgmt-keyvault
10197 azure-mgmt-network
10298 azure-mgmt-resource
10399 azure-mgmt-security
104100 azure-mgmt-storage
101+ azure-mgmt-sql
105102 azure-mgmt-web
106− azure-storage-file
107− azure-storage-file-share
103+ azure-storage
108104 bandit
109105 bcrypt
110106 beautifulsoup4
@@ -132,28 +128,67 @@ buildPythonPackage rec {
132128 pyhcl
133129 pyjks
134130 pynacl
131+ pyodbc
135132 pyopenssl
136133 pypdf2
137134 pysmb
135+ pytesseract
138136 python_magic
139137 pytz
138+ pywinrm
140139 requirements-detector
141140 selenium
142141 tlslite-ng
143142 viewstate
144143 ];
145144
145+ configurePhase = ''
146+ mkdir -p build/config
147+ touch build/config/README.rst
148+ '';
149+
146150 checkInputs = [
151+ docker
152+ flask
153+ flask-httpauth
147154 pytest
148155 ];
149156
150157 checkPhase = ''
158+ # This tests require BWAPP Docker Container
159+ sed -ie 's/test_a[0-9]//g' ./test/test_proto_http_open.py
160+ sed -ie 's/test_a[0-9]//g' ./test/test_proto_http_close.py
161+
162+ # This tests require network connectivity
163+ sed -ie 's/test_is_date_unsyncd//g' ./test/test_proto_http_open.py
164+ sed -ie 's/test_is_date_unsyncd//g' ./test/test_proto_http_close.py
165+
166+ # Remove impurities
167+ substituteInPlace ./test/conftest.py \
168+ --replace "import wait" "" \
169+ --replace "if not os.path.exists(name):" "if os.path.exists(name):" \
170+ --replace "from test.mock import graphql_server" "" \
171+ --replace "(graphql_server.start, 'MockGraphQLServer', ['proto_graphql'])," "" \
172+
173+ pytest --asserts-module 'iot' \
174+ test/test_iot_phone.py
175+
176+ pytest --asserts-module 'ot' \
177+ test/test_ot_powerlogic.py
178+
179+ pytest --asserts-module 'proto_http' \
180+ test/test_proto_{http_close,http_open}.py
181+
182+ pytest --asserts-module 'proto_rest' \
183+ test/test_proto_rest.py
184+
151185 # This file launches mock docker containers and servers
152186 # let's remove it to create a custom test environment
153187 rm test/conftest.py
154188
155189 pytest \
156− test/test_cloud_aws_terraform_{ebs,ec2}.py \
190+ test/test_cloud_aws_terraform_{cloudfront,dynamodb,ebs,ec2,elb}.py \
191+ test/test_cloud_aws_terraform_{fsx,iam,kms,rds,s3}.py \
157192 test/test_cloud_aws_cloudformation_{cloudfront,dynamodb,ec2,elb,elb2}.py \
158193 test/test_cloud_aws_cloudformation_{fsx,iam,kms,rds,s3,secretsmanager}.py \
159194 test/test_format_{apk,jks,jwt,pdf,pkcs12,string}.py \
@@ -161,7 +196,6 @@ buildPythonPackage rec {
161196 test/test_lang_{javascript,java}.py \
162197 test/test_lang_{core,csharp,docker,dotnetconfig,html,php,python,rpgle}.py \
163198 test/test_utils_generic.py
164−
165199 '';
166200
167201 meta = with lib; {