tests: replace nose with pytest
We do use the pytest-django plugin to manage the django db setup magic, so with this change, we can run tests without an existing db, or starting a postgres db dedicated to the tests using pifpaf.
related to swh-environment#1261 (closed)
also:
-
replace assertEquals -> assertEqual
-
qdd a tox file
We need to explicitely specify the location where pytest looks for tests to prevent the kind of nasty error described here:
https://tox.readthedocs.io/en/latest/example/pytest.html#known-issues-and-limitations
Also note that migrations scripts are excluded from flake8 in the tox file.
related to swh/infra/ci-cd/swh-jenkins-jobs#1247 (closed).
Test Plan
tox should be happy, hopefully jenkins will also
Migrated from D592 (view on Phabricator)