f79c65815a
The alfajor HTTP test wrapper is not working properly. All the tests are failing with: AttributeError: '_APIClientResponse' object has no attribute '_status_code' It doesn't look like alfajor is being maintained any more [1, 2], so remove the dependency on it and run the tests directly through the werkzeug client instead. The test_json_get_styles test still failed because the content and ordering of the styles returned from the API is dependent on the platform on which the tests run. Instead of testing against a fixed expected result, which could be different on another platform, generate the expected results dynamically. Update the tox configuration and test-requirements.txt to be able to run the tests via tox. [1] https://github.com/idealist/Alfajor [2] https://github.com/idealistdev/alfajor Change-Id: I4db6783b9d725ce096575035ea27d28be8e6fed5
19 lines
376 B
INI
19 lines
376 B
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = pep8, py27
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = nosetests
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[flake8]
|
|
show-source = true
|
|
max-line-length = 80
|
|
exclude = ENV,.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|