package/python-django: bump to version 2.2.6
PATCH v2 1/2 package/python-django: bump to version 2.2.6
From: Adam Duskett <[email protected]>
--- package/python-django/python-django.hash | 4 ++-- package/python-django/python-django.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
package/python-django/python-django.hash +2 -2
@@ -1,5 +1,5 @@ # md5, sha256 from https://pypi.org/pypi/django/json -md5 b32e396c354880742d85a7628a0bdd5a Django-2.2.4.tar.gz -sha256 16a5d54411599780ac9dfe3b9b38f90f785c51259a584e0b24b6f14a7f69aae8 Django-2.2.4.tar.gz +md5 796c175a2f94e938c60d84b4565216af Django-2.2.6.tar.gz +sha256 a8ca1033acac9f33995eb2209a6bf18a4681c3e5269a878e9a7e0b7384ed1ca3 Django-2.2.6.tar.gz # Locally computed sha256 checksums sha256 b846415d1b514e9c1dff14a22deb906d794bc546ca6129f950a18cd091e2a669 LICENSE
package/python-django/python-django.mk +2 -2
@@ -4,10 +4,10 @@ # ################################################################################ -PYTHON_DJANGO_VERSION = 2.2.4 +PYTHON_DJANGO_VERSION = 2.2.6 PYTHON_DJANGO_SOURCE = Django-$(PYTHON_DJANGO_VERSION).tar.gz # The official Django site has an unpractical URL -PYTHON_DJANGO_SITE = https://files.pythonhosted.org/packages/19/11/3449a2071df9427e7a5c4dddee2462e88840dd968a9b0c161097154fcb0c +PYTHON_DJANGO_SITE = https://files.pythonhosted.org/packages/c7/2c/bbd0fddf6a08456c3100b8e8b230f3288d4511985aa4e2368b0d115b5aae PYTHON_DJANGO_LICENSE = BSD-3-Clause PYTHON_DJANGO_LICENSE_FILES = LICENSE PYTHON_DJANGO_SETUP_TYPE = setuptools
Signature · 1 line
2.21.0
PATCH v2 2/2 support/testing: add python-django test
From: Adam Duskett <[email protected]>
This test comprises of two simple steps:
1: Start a new simple project called testsite.
2: Run ./manage.py migrate on the new testsite.
---
Changes v1 -> v2:
- Cleaned up flake8 warning. (Ricardo)
- Used && instead of ; when changing directories (Ricardo)
- Removed extra blank line (Ricardo)
.gitlab-ci.yml | 1 + .../tests/package/sample_python_django.py | 1 + .../tests/package/test_python_django.py | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 support/testing/tests/package/sample_python_django.py create mode 100644 support/testing/tests/package/test_python_django.py
.gitlab-ci.yml +1 -0
@@ -438,6 +438,7 @@ tests.package.test_python_constantly.TestPythonPy3Constantly: { extends: .runtim tests.package.test_python_crossbar.TestPythonPy3Crossbar: { extends: .runtime_test } tests.package.test_python_cryptography.TestPythonPy2Cryptography: { extends: .runtime_test } tests.package.test_python_cryptography.TestPythonPy3Cryptography: { extends: .runtime_test } +tests.package.test_python_django.TestPythonPy3Django: { extends: .runtime_test } tests.package.test_python_incremental.TestPythonPy2Incremental: { extends: .runtime_test } tests.package.test_python_incremental.TestPythonPy3Incremental: { extends: .runtime_test } tests.package.test_python_passlib.TestPythonPy2Passlib: { extends: .runtime_test }
support/testing/tests/package/sample_python_django.py new file +1 -0
@@ -0,0 +1 @@ +import django # noqa: F401
support/testing/tests/package/test_python_django.py new file +26 -0
@@ -0,0 +1,26 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonDjango(TestPythonPackageBase): + config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_django.py"] + + def run_sample_scripts(self): + cmd = "cd /opt && /usr/bin/django-admin startproject testsite" + _, exit_code = self.emulator.run(cmd, timeout=30) + self.assertEqual(exit_code, 0) + cmd = "cd /opt/testsite && " + self.interpreter + " ./manage.py migrate" + output, exit_code = self.emulator.run(cmd, timeout=30) + self.assertIn("Operations to perform:", output[0]) + self.assertEqual(exit_code, 0) + + +class TestPythonPy3Django(TestPythonDjango): + __test__ = True + config = TestPythonDjango.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_DJANGO=y + BR2_PACKAGE_PYTHON_SQLPARSE=y + BR2_PACKAGE_PYTHON3_SQLITE=y + """
Signature · 1 line
2.21.0
PATCH v2 2/2 support/testing: add python-django test
Quoted 3 lines · On Wed, 16 Oct 2019 12:09:00 -0700 aduskett at gmail.com wrote:
This test comprises of two simple steps:
1: Start a new simple project called testsite.
2: Run ./manage.py migrate on the new testsite.
Don't we want to actually run the site in the local webserver, and connect to it ?
Quoted 25 lines
.gitlab-ci.yml +1
-0@@ -438,6 +438,7 @@ tests.package.test_python_constantly.TestPythonPy3Constantly: { extends: .runtim tests.package.test_python_crossbar.TestPythonPy3Crossbar: { extends: .runtime_test } tests.package.test_python_cryptography.TestPythonPy2Cryptography: { extends: .runtime_test } tests.package.test_python_cryptography.TestPythonPy3Cryptography: { extends: .runtime_test } +tests.package.test_python_django.TestPythonPy3Django: { extends: .runtime_test } tests.package.test_python_incremental.TestPythonPy2Incremental: { extends: .runtime_test } tests.package.test_python_incremental.TestPythonPy3Incremental: { extends: .runtime_test } tests.package.test_python_passlib.TestPythonPy2Passlib: { extends: .runtime_test }support/testing/tests/package/sample_python_django.py new file +1
-0@@ -0,0 +1 @@ +import django # noqa: F401support/testing/tests/package/test_python_django.py new file +0
-0
support/testing/tests/package/test_python_django.py line 8
Quoted 8 lines
support/testing/tests/package/test_python_django.py new file +8
-0@@ -0,0 +1,26 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonDjango(TestPythonPackageBase): + config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_django.py"] + + def run_sample_scripts(self):
Is this method really executed ? I thought only methods starting by test_<something>() were executed. Our current typical practice is to call the main test method test_run().
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 2/2 support/testing: add python-django test
Hello,
Quoted 9 lines · Thomas Petazzoni
Quoted 3 lines · On Wed, 16 Oct 2019 12:09:00 -0700 aduskett at gmail.com wrote:
This test comprises of two simple steps:
1: Start a new simple project called testsite.
2: Run ./manage.py migrate on the new testsite.Don't we want to actually run the site in the local webserver, and connect to it ?
Certainly it would be better.
The python-twisted test uses a mid-ground solution, by starting the server in background and checking with netstat that the server did opened the expected port.
[snip]
Quoted 6 lines
Quoted 6 lines
+++
b/support/testing/tests/package/test_python_django.pysupport/testing/tests/package/test_python_django.py new file +4
-0@@ -0,0 +1,26 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonDjango(TestPythonPackageBase):
Quoted 8 lines
support/testing/tests/package/test_python_django.py line 8
Quoted 4 lines
support/testing/tests/package/test_python_django.py new file +4
-0+ config = TestPythonPackageBase.config + sample_scripts = ["tests/package/sample_python_django.py"] + + def run_sample_scripts(self):Is this method really executed ? I thought only methods starting by test_<something>() were executed. Our current typical practice is to call the main test method
test_run().
Yes. The test_run is declared in the parent class TestPythonPackageBase and it calls this method.
The same (overriding run_sample_scripts) is already done in the python-twisted test.
Regards,
Ricardo
Thomas Petazzoni
AppliedPATCH v2 1/2 package/python-django: bump to version 2.2.6
In reply to aduskett at gmail.comQuoted 7 lines · On Wed, 16 Oct 2019 12:08:59 -0700 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
Signed-off-by Adam Duskett <[email protected]>--- package/python-django/python-django.hash | 4 ++-- package/python-django/python-django.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com