Skip to content

Commit f553bdd

Browse files
committed
Added bandit, safety and pytest
1 parent 467a6f8 commit f553bdd

File tree

8 files changed

+195
-27
lines changed

8 files changed

+195
-27
lines changed

Pipfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ flask-opentracing = "*"
1616
[dev-packages]
1717
requests-mock = "*"
1818
coverage = "*"
19-
mock = "*"
20-
nose = "*"
19+
pytest = "*"
20+
pytest-cov = "*"
2121
pylint = "*"
2222
tox = "*"
23+
safety = "*"
24+
bandit = "*"
2325

2426
[requires]
2527
python_version = "3.6"

Pipfile.lock

Lines changed: 116 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements-tests.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
anyconfig==0.9.8
2+
astroid==2.2.0.dev0
3+
atomicwrites==1.2.1
4+
attrs==18.2.0
5+
bandit==1.5.1
6+
basictracer==3.0.0
7+
certifi==2018.11.29
8+
chardet==3.0.4
9+
Click==7.0
10+
clickclick==1.2.2
11+
connexion==2018.0.dev1
12+
coverage==5.0a4
13+
coveralls==1.5.1
14+
docopt==0.6.2
15+
dparse==0.4.1
16+
filelock==3.0.10
17+
Flask==1.0.2
18+
Flask-OpenTracing==1.0.0
19+
gitdb2==2.0.5
20+
GitPython==2.1.11
21+
googleapis-common-protos==1.5.3
22+
idna==2.8
23+
inflection==0.3.1
24+
isort==4.3.4
25+
itsdangerous==1.1.0
26+
Jinja2==2.10
27+
jsonpickle==1.1
28+
jsonschema==2.6.0
29+
lazy-object-proxy==1.3.1
30+
lightstep==4.0.2
31+
MarkupSafe==1.1.0
32+
mccabe==0.6.1
33+
mock==2.0.0
34+
more-itertools==5.0.0
35+
nose==1.3.7
36+
openapi-spec-validator==0.2.4
37+
opentracing==2.0.0
38+
packaging==19.0
39+
pbr==5.1.1
40+
pluggy==0.8.1
41+
protobuf==3.6.1
42+
py==1.7.0
43+
py-ms==1.0.0
44+
pylint==2.3.0.dev1
45+
pyparsing==2.3.1
46+
pytest==4.1.1
47+
pytest-cov==2.6.1
48+
python-coveralls==2.9.1
49+
python-json-logger==0.1.10
50+
PyYAML==4.2b4
51+
requests==2.15.0
52+
requests-mock==1.5.2
53+
safety==1.8.4
54+
six==1.12.0
55+
smmap2==2.0.5
56+
stevedore==1.30.0
57+
swagger-ui-bundle==0.0.3
58+
thrift==0.10.0
59+
toml==0.10.0
60+
tox==3.7.0
61+
typed-ast==1.1.0
62+
urllib3==1.24.1
63+
virtualenv==16.3.0
64+
Werkzeug==0.14.1
65+
wrapt==1.11.1

tests/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ paths:
4242
description: "Example"
4343
405:
4444
description: "Invalid input"
45-
x-swagger-router-controller: "tests.tests_flask"
45+
x-swagger-router-controller: "tests.test_flask"
4646
externalDocs:
4747
description: "Find out more about Swagger"
4848
url: "http://swagger.io"
File renamed without changes.
File renamed without changes.
File renamed without changes.

tox.ini

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
[tox]
2-
envlist = py36
2+
envlist = py36,bandit,safety
33

44
[testenv]
5+
deps = -rrequirements-tests.txt
56
commands =
6-
coverage erase
7-
coverage run -m unittest
8-
coverage report -m
9-
coverage xml -i
10-
coverage html -i
7+
pytest --cov=pyms --cov=tests tests/
118
bash -c 'pylint --rcfile={toxinidir}/pylintrc --load-plugins=pylint.extensions.docparams, pylint.extensions.mccabe {envsitepackagesdir}/project > pylintReport.txt || true'
129
install_command =
1310
pip install {opts} {packages}
14-
recreate = True
1511
whitelist_externals = /bin/bash
1612

1713
[testenv:py36]
1814
basepython = python3.6
19-
deps = -rrequirements-tests.txt
2015
[testenv:py35]
2116
basepython = python3.5
22-
deps = -rrequirements-tests.txt
23-
[testenv:py27]
24-
basepython = python2.7
25-
deps = -rrequirements-tests.txt
17+
[testenv:bandit]
18+
basepython = python3.6
19+
commands = bandit -r pyms/
20+
[testenv:safety]
21+
basepython = python3.6
22+
commands = safety check -r requirements-tests.txt

0 commit comments

Comments
 (0)