From 50fe74c57e7aa66d1cc7ef8975afcba93208e395 Mon Sep 17 00:00:00 2001 From: Karel Hovorka Date: Tue, 10 Dec 2024 10:43:56 +0100 Subject: [PATCH 1/3] Fixed tox config according to version 4. https://tox.wiki/en/4.0.3/faq.html#tox-4-changed-ini-rules --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f005477..884815c 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ DJANGO = 5.0: django50 [testenv] -passenv = TRAVIS TRAVIS_* GITHUB_* +passenv = TRAVIS,TRAVIS_*,GITHUB_* deps= coverage coveralls From f65607c93ae48a1038eb26a817a2b92b6820685e Mon Sep 17 00:00:00 2001 From: Karel Hovorka Date: Tue, 10 Dec 2024 10:44:48 +0100 Subject: [PATCH 2/3] Synchronized test requirements with tox. --- test_reqs.txt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/test_reqs.txt b/test_reqs.txt index 3506d20..09874d0 100644 --- a/test_reqs.txt +++ b/test_reqs.txt @@ -1,11 +1,5 @@ -Django==2.2.8 -Pillow>=6.2.0 -Sphinx==1.2.3 -coverage==5.5 -coveralls==3.0.1 -djangorestframework==3.10.3 -flake8==2.2.5 -python-magic==0.4.22 -requests==2.5.1 -sphinx-rtd-theme==0.1.6 -testfixtures==6.17.1 +Pillow +coverage +coveralls +djangorestframework +testfixtures \ No newline at end of file From bec72b625ecd54b62ac1fd582eed4d627e0b0359 Mon Sep 17 00:00:00 2001 From: Karel Hovorka Date: Tue, 10 Dec 2024 10:45:16 +0100 Subject: [PATCH 3/3] Added manage.py so that tests can be run directly as django management command. --- manage.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 manage.py diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..60a8174 --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.test_settings") + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == "__main__": + main()