Accepting request 693732 from devel:languages:python:django
OBS-URL: https://build.opensuse.org/request/show/693732 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Django?expand=0&rev=50
This commit is contained in:
commit
3603a83a8b
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:939652e9d34d7d53d74d5d8ef82a19e5f8bb2de75618f7e5360691b6e9667963
|
|
||||||
size 8608548
|
|
@ -1,62 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNED MESSAGE-----
|
|
||||||
Hash: SHA256
|
|
||||||
|
|
||||||
This file contains MD5, SHA1, and SHA256 checksums for the source-code
|
|
||||||
tarball and wheel files of Django 2.1.7, released February 11, 2019.
|
|
||||||
|
|
||||||
To use this file, you will need a working install of PGP or other
|
|
||||||
compatible public-key encryption software. You will also need to have
|
|
||||||
the Django release manager's public key in your keyring; this key has
|
|
||||||
the ID ``E17DF5C82B4F9D00`` and can be imported from the MIT
|
|
||||||
keyserver. For example, if using the open-source GNU Privacy Guard
|
|
||||||
implementation of PGP:
|
|
||||||
|
|
||||||
gpg --keyserver pgp.mit.edu --recv-key E17DF5C82B4F9D00
|
|
||||||
|
|
||||||
Once the key is imported, verify this file::
|
|
||||||
|
|
||||||
gpg --verify <<THIS FILENAME>>
|
|
||||||
|
|
||||||
Once you have verified this file, you can use normal MD5, SHA1, or SHA256
|
|
||||||
checksumming applications to generate the checksums of the Django
|
|
||||||
package and compare them to the checksums listed below.
|
|
||||||
|
|
||||||
Release packages:
|
|
||||||
=================
|
|
||||||
|
|
||||||
https://www.djangoproject.com/m/releases/2.1/Django-2.1.7-py3-none-any.whl
|
|
||||||
https://www.djangoproject.com/m/releases/2.1/Django-2.1.7.tar.gz
|
|
||||||
|
|
||||||
MD5 checksums
|
|
||||||
=============
|
|
||||||
|
|
||||||
9b2efcc20342cb780630c02734553c1a Django-2.1.7-py3-none-any.whl
|
|
||||||
a042e6ba117d2e01950d842cceb5eee0 Django-2.1.7.tar.gz
|
|
||||||
|
|
||||||
SHA1 checksums
|
|
||||||
==============
|
|
||||||
|
|
||||||
e818497e0d08208acda63bc3a5afdb85858486b0 Django-2.1.7-py3-none-any.whl
|
|
||||||
e1529c46fd643346e6ff8c7f3ba57c398223201f Django-2.1.7.tar.gz
|
|
||||||
|
|
||||||
SHA256 checksums
|
|
||||||
================
|
|
||||||
|
|
||||||
275bec66fd2588dd517ada59b8bfb23d4a9abc5a362349139ddda3c7ff6f5ade Django-2.1.7-py3-none-any.whl
|
|
||||||
939652e9d34d7d53d74d5d8ef82a19e5f8bb2de75618f7e5360691b6e9667963 Django-2.1.7.tar.gz
|
|
||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iQIzBAEBCAAdFiEE/l+2OHah1xioxnVW4X31yCtPnQAFAlxhj9UACgkQ4X31yCtP
|
|
||||||
nQCQMRAAwlhgDkKvJSYdJH4No5t6DwnSIvz845Zq7oEnkToTo32lZOoVgGgy1f+z
|
|
||||||
ze4bUMLqljxy6WFIL+K7QsvtCGwKcDKrP0Oi4YbPvAsQ01SplPKd66DvcIfhJMv7
|
|
||||||
vaIAb47tCSPRvfGrL9KFSvj1mzFl8WO2+UlUbiqIojkg83Xll1Wdv9Lx7mlF423N
|
|
||||||
5tpk1Mj3Pk8TLT5gk0ghcIYYgHsXK0eaBaGSNI+rBRPI5HDKj1VCf+c23I+PJRqh
|
|
||||||
KMzvf2NWHbu+h8Qa4MkTDT2NEBbQvennW6Wa8WgBOZjVQ9KpMjinS4s6s5nlDskd
|
|
||||||
FATIGDKNO48uWn3LDofKjv62EAeW5Nh6S2juHHarXPIv6W7LtPVGTS3X8xn2wXa0
|
|
||||||
Q5YyhOyFJGEG452tfm5eqrHb6uhUfXKQngDM/fqv6gh6+gv17/kdVDAfm6Y6EEZN
|
|
||||||
YR7lx5O94SkjQA5mLAx6+PkxWP5AbyMZY/CpakcMcR2H6xXytLcQKXjB1TRoXb9C
|
|
||||||
NGLjlSM5X40ETlQYqAOWqo7524Tpdot2fcalyBl36UwJcp3bP5GJXy90xvuxOzGQ
|
|
||||||
V0BfbdOAgFSj9oaa+y5JiHjHIY3wCCl0vVkmiY6HoJ3NBp040SDItuzt0PilXPFg
|
|
||||||
GTX9jTpGQXPjDNGQ2N3nAL27/J3XYlSaH1BrG4Cysb6oAbqPAiI=
|
|
||||||
=v5/g
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
Django-2.2.tar.gz
Normal file
3
Django-2.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7c3543e4fb070d14e10926189a7fcf42ba919263b7473dceaefce34d54e8a119
|
||||||
|
size 8843237
|
62
Django-2.2.tar.gz.asc
Normal file
62
Django-2.2.tar.gz.asc
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
-----BEGIN PGP SIGNED MESSAGE-----
|
||||||
|
Hash: SHA256
|
||||||
|
|
||||||
|
This file contains MD5, SHA1, and SHA256 checksums for the source-code
|
||||||
|
tarball and wheel files of Django 2.2, released April 1, 2019.
|
||||||
|
|
||||||
|
To use this file, you will need a working install of PGP or other
|
||||||
|
compatible public-key encryption software. You will also need to have
|
||||||
|
the Django release manager's public key in your keyring; this key has
|
||||||
|
the ID ``E17DF5C82B4F9D00`` and can be imported from the MIT
|
||||||
|
keyserver. For example, if using the open-source GNU Privacy Guard
|
||||||
|
implementation of PGP:
|
||||||
|
|
||||||
|
gpg --keyserver pgp.mit.edu --recv-key E17DF5C82B4F9D00
|
||||||
|
|
||||||
|
Once the key is imported, verify this file::
|
||||||
|
|
||||||
|
gpg --verify <<THIS FILENAME>>
|
||||||
|
|
||||||
|
Once you have verified this file, you can use normal MD5, SHA1, or SHA256
|
||||||
|
checksumming applications to generate the checksums of the Django
|
||||||
|
package and compare them to the checksums listed below.
|
||||||
|
|
||||||
|
Release packages:
|
||||||
|
=================
|
||||||
|
|
||||||
|
https://www.djangoproject.com/m/releases/2.2/Django-2.2.tar.gz
|
||||||
|
https://www.djangoproject.com/m/releases/2.2/Django-2.2-py3-none-any.whl
|
||||||
|
|
||||||
|
MD5 checksums
|
||||||
|
=============
|
||||||
|
|
||||||
|
41c4b4ec55b1cb373e5128156e9dcbd2 Django-2.2.tar.gz
|
||||||
|
a7a8bfd5fcd4cba08ca683944e375843 Django-2.2-py3-none-any.whl
|
||||||
|
|
||||||
|
SHA1 checksums
|
||||||
|
==============
|
||||||
|
|
||||||
|
2dd1270cebe5dfc5aa03283c6ae956f5f056dc9f Django-2.2.tar.gz
|
||||||
|
e91e1cc2c08b9230b0fad71fce90f5ffdf4733ec Django-2.2-py3-none-any.whl
|
||||||
|
|
||||||
|
SHA256 checksums
|
||||||
|
================
|
||||||
|
|
||||||
|
7c3543e4fb070d14e10926189a7fcf42ba919263b7473dceaefce34d54e8a119 Django-2.2.tar.gz
|
||||||
|
a2814bffd1f007805b19194eb0b9a331933b82bd5da1c3ba3d7b7ba16e06dc4b Django-2.2-py3-none-any.whl
|
||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIzBAEBCAAdFiEE/l+2OHah1xioxnVW4X31yCtPnQAFAlyiB8AACgkQ4X31yCtP
|
||||||
|
nQAW6Q/7BHPxIv12/E8pOOdl/QkJYqJytVTf1z/G/oBhNxzZqT75gvaiOIQNNejS
|
||||||
|
DgJGWldm64E1ze9UHn4AFiXLUmUHKWMS3G9ZnfyPnyaNaTljikNIt+iEOahDtHEF
|
||||||
|
ukLJcYfE//1RoTY0EgOfdJ3ZEhWqf9+ne9aZXOWWNjNBdLeKhB4pzK/CgiQgGJie
|
||||||
|
2OltXMVOJfDxQ1VYXWYRZr6OxLHogQVrVgR5FXi3UAf1VLa85vH0sKxsB8ZILBRQ
|
||||||
|
L4hb4jx4orB29nd0jieb5GyHMIsSXvhk5weM1PxeBUEh6Yz7mIK3fhnUABpf15RU
|
||||||
|
HmJTjFFwRAp77XTYu3+2bSwUIFD2UnuR11Si9HslbAc8psiTWZ0Uax3NdLOm3zAB
|
||||||
|
vo504Pks+lgRd9qcspk60hdBHh2ICon+Q8cQnLAl6igcXKvWatpZc0C8/e0Shm/W
|
||||||
|
VkR5Hhcq8Z9IPB/yWH62eLEckoDn8qkG5qxwUcXiSh1n8PliccXEBzJDdMeeP1b1
|
||||||
|
cXEug8p09IZJDB9A/EeAgIHIm5wJ3/C0pk3UwbGjRIlRqjm0QgcWCojrXpeTq4FG
|
||||||
|
hSqOuYsydedoQD8a6rZ5eloU4It4lGucwWdQ/Db7KK0cYPG/jxSQp9JWtCq496Rz
|
||||||
|
Myh4FkHF2oRWNI1ra282m0Q8hUTdL2KWR4tJnbdHbNWo7IH2y/I=
|
||||||
|
=QN+e
|
||||||
|
-----END PGP SIGNATURE-----
|
13
i18n_test.patch
Normal file
13
i18n_test.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: Django-2.2/tests/i18n/tests.py
|
||||||
|
===================================================================
|
||||||
|
--- Django-2.2.orig/tests/i18n/tests.py
|
||||||
|
+++ Django-2.2/tests/i18n/tests.py
|
||||||
|
@@ -1820,7 +1820,7 @@ class WatchForTranslationChangesTests(Si
|
||||||
|
|
||||||
|
def test_i18n_app_dirs(self):
|
||||||
|
mocked_sender = mock.MagicMock()
|
||||||
|
- with self.settings(INSTALLED_APPS=['tests.i18n.sampleproject']):
|
||||||
|
+ with self.settings(INSTALLED_APPS=['i18n.sampleproject']):
|
||||||
|
watch_for_translation_changes(mocked_sender)
|
||||||
|
project_dir = Path(__file__).parent / 'sampleproject' / 'locale'
|
||||||
|
mocked_sender.watch_dir.assert_any_call(project_dir, '**/*.mo')
|
@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 10 07:55:46 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Add test_clear_site_cache-sort.patch to workaround flaky test
|
||||||
|
- Add bcond_with for selenium and memcached, as those tests are inactive,
|
||||||
|
and add missing dependencies and setup for selenium testing
|
||||||
|
- Move removal of executable bit from a JavaScript file to %prep
|
||||||
|
- Fix fdupes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 3 11:21:56 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||||
|
|
||||||
|
- update to 2.2
|
||||||
|
- drop pyyaml5.patch
|
||||||
|
- add i18n_test.patch
|
||||||
|
* HttpRequest.headers to allow simple access to a request’s headers.
|
||||||
|
* Database-level constraints on models.
|
||||||
|
* Watchman compatibility for runserver to improve the performance
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Mar 23 16:31:46 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Sat Mar 23 16:31:46 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -16,20 +16,25 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Selenium and memcached are not operational
|
||||||
|
%bcond_with selenium
|
||||||
|
%bcond_with memcached
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-Django
|
Name: python-Django
|
||||||
Version: 2.1.7
|
# We want support LTS versions of Django - odd numbered 2.2 -> 2.4 -> 2.6 -> 3.0 etc
|
||||||
|
Version: 2.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A high-level Python Web framework
|
Summary: A high-level Python Web framework
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://www.djangoproject.com
|
URL: http://www.djangoproject.com
|
||||||
Source: https://www.djangoproject.com/m/releases/2.1/Django-%{version}.tar.gz
|
Source: https://www.djangoproject.com/m/releases/2.2/Django-%{version}.tar.gz
|
||||||
Source1: https://www.djangoproject.com/m/pgp/Django-%{version}.checksum.txt#/Django-%{version}.tar.gz.asc
|
Source1: https://www.djangoproject.com/m/pgp/Django-%{version}.checksum.txt#/Django-%{version}.tar.gz.asc
|
||||||
Source2: %{name}.keyring
|
Source2: %{name}.keyring
|
||||||
Source99: python-Django-rpmlintrc
|
Source99: python-Django-rpmlintrc
|
||||||
Patch0: pyyaml5.patch
|
Patch0: i18n_test.patch
|
||||||
|
Patch1: test_clear_site_cache-sort.patch
|
||||||
BuildRequires: %{python_module Jinja2 >= 2.9.2}
|
BuildRequires: %{python_module Jinja2 >= 2.9.2}
|
||||||
BuildRequires: %{python_module Pillow}
|
BuildRequires: %{python_module Pillow}
|
||||||
BuildRequires: %{python_module PyYAML}
|
BuildRequires: %{python_module PyYAML}
|
||||||
@ -39,23 +44,30 @@ BuildRequires: %{python_module bcrypt}
|
|||||||
BuildRequires: %{python_module docutils}
|
BuildRequires: %{python_module docutils}
|
||||||
BuildRequires: %{python_module geoip2}
|
BuildRequires: %{python_module geoip2}
|
||||||
BuildRequires: %{python_module numpy}
|
BuildRequires: %{python_module numpy}
|
||||||
BuildRequires: %{python_module pylibmc}
|
|
||||||
BuildRequires: %{python_module python-memcached >= 1.59}
|
|
||||||
BuildRequires: %{python_module pytz}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module sqlparse}
|
BuildRequires: %{python_module sqlparse}
|
||||||
BuildRequires: %{python_module tblib}
|
BuildRequires: %{python_module tblib}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# python-selenium is supported only on the Intel architecture
|
%if %{with memcached}
|
||||||
# Django testsuite runs just fine without, just skips the affected tests
|
BuildRequires: %{python_module pylibmc}
|
||||||
|
BuildRequires: %{python_module python-memcached >= 1.59}
|
||||||
|
%endif
|
||||||
|
%if %{with selenium}
|
||||||
|
# python-selenium is supported only on the Intel architecture.
|
||||||
|
# Additionally chromedriver is only available on x86_64.
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
BuildRequires: %{python_module selenium}
|
BuildRequires: %{python_module selenium}
|
||||||
|
BuildRequires: chromedriver
|
||||||
|
BuildRequires: xvfb-run
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Requires: python-Pillow
|
Requires: python-Pillow
|
||||||
Requires: python-argon2-cffi >= 16.1.0
|
Requires: python-argon2-cffi >= 16.1.0
|
||||||
Requires: python-pytz
|
Requires: python-pytz
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
|
Requires: python-sqlparse
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
Recommends: python-Jinja2 >= 2.9.2
|
Recommends: python-Jinja2 >= 2.9.2
|
||||||
@ -84,6 +96,8 @@ echo "`grep -e '^[0-9a-f]\{64\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-
|
|||||||
|
|
||||||
%setup -q -n Django-%{version}
|
%setup -q -n Django-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -95,29 +109,23 @@ echo "`grep -e '^[0-9a-f]\{64\} Django-%{version}.tar.gz' %{SOURCE1} | cut -c1-
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/django-admin
|
%python_clone -a %{buildroot}%{_bindir}/django-admin
|
||||||
|
|
||||||
%{python_expand install -D -m 0644 extras/django_bash_completion %{buildroot}%%{_datadir}/bash-completion/completions/django_bash_completion-%{$python_bin_suffix}.sh
|
%{python_expand install -D -m 0644 extras/django_bash_completion %{buildroot}%%{_datadir}/bash-completion/completions/django_bash_completion-%{$python_bin_suffix}.sh
|
||||||
pushd %{buildroot}%{$python_sitelib}
|
|
||||||
chmod a-x django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.js
|
|
||||||
# Fix wrong-script-interpreter
|
# Fix wrong-script-interpreter
|
||||||
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" django/bin/django-admin.py
|
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" \
|
||||||
sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" django/conf/project_template/manage.py-tpl
|
%{buildroot}%{$python_sitelib}/django/bin/django-admin.py \
|
||||||
%fdupes .
|
%{buildroot}%{$python_sitelib}/django/conf/project_template/manage.py-tpl
|
||||||
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
%fdupes %{buildroot}%{$python_sitelib}/django/
|
||||||
$python -m compileall -d %{$python_sitelib} django/bin/
|
%fdupes %{buildroot}%{$python_sitelib}/Django-%{version}-py*.egg-info/
|
||||||
$python -O -m compileall -d %{$python_sitelib} django/bin/
|
|
||||||
$python -m compileall -d %{$python_sitelib} django/conf/project_template/
|
|
||||||
$python -O -m compileall -d %{$python_sitelib} django/conf/project_template/
|
|
||||||
$python -m compileall -d %{$python_sitelib} django/conf/locale/
|
|
||||||
$python -O -m compileall -d %{$python_sitelib} django/conf/locale/
|
|
||||||
$python -m compileall -d %{$python_sitelib} django/conf/locale/ru/
|
|
||||||
$python -O -m compileall -d %{$python_sitelib} django/conf/locale/ru/
|
|
||||||
%fdupes django/bin/
|
|
||||||
popd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export LANG=en_US.UTF8
|
export LANG=en_US.UTF8
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
|
%if %{with selenium}
|
||||||
|
export PATH=%{_libdir}/chromium:$PATH
|
||||||
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run $python tests/runtests.py -v 2 --selenium=chome
|
||||||
|
%else
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests/runtests.py
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests/runtests.py
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{python_install_alternative django-admin.py django-admin}
|
%{python_install_alternative django-admin.py django-admin}
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
From a57c783dd4e6dc73847081221827a1902eede88b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
||||||
Date: Wed, 13 Mar 2019 20:06:47 +0100
|
|
||||||
Subject: [PATCH] Fixed serializers tests for PyYAML 5.1+.
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/serializers/test_yaml.py | 4 +++-
|
|
||||||
tests/timezones/tests.py | 12 ++++++------
|
|
||||||
2 files changed, 9 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/serializers/test_yaml.py b/tests/serializers/test_yaml.py
|
|
||||||
index e876597e9d04..dbcbd57003f4 100644
|
|
||||||
--- a/tests/serializers/test_yaml.py
|
|
||||||
+++ b/tests/serializers/test_yaml.py
|
|
||||||
@@ -115,7 +115,9 @@ class YamlSerializerTestCase(SerializersTestBase, TestCase):
|
|
||||||
author: %(author_pk)s
|
|
||||||
headline: Poker has no place on ESPN
|
|
||||||
pub_date: 2006-06-16 11:00:00
|
|
||||||
- categories: [%(first_category_pk)s, %(second_category_pk)s]
|
|
||||||
+ categories:""" + (
|
|
||||||
+ ' [%(first_category_pk)s, %(second_category_pk)s]' if yaml.__version__ < '5.1'
|
|
||||||
+ else '\n - %(first_category_pk)s\n - %(second_category_pk)s') + """
|
|
||||||
meta_data: []
|
|
||||||
"""
|
|
||||||
|
|
||||||
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
|
|
||||||
index e54b011c0426..7a63bac67000 100644
|
|
||||||
--- a/tests/timezones/tests.py
|
|
||||||
+++ b/tests/timezones/tests.py
|
|
||||||
@@ -643,7 +643,7 @@ def test_naive_datetime(self):
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
|
|
||||||
if not isinstance(serializers.get_serializer('yaml'), serializers.BadSerializer):
|
|
||||||
- data = serializers.serialize('yaml', [Event(dt=dt)])
|
|
||||||
+ data = serializers.serialize('yaml', [Event(dt=dt)], default_flow_style=None)
|
|
||||||
self.assert_yaml_contains_datetime(data, "2011-09-01 13:20:30")
|
|
||||||
obj = next(serializers.deserialize('yaml', data)).object
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
@@ -667,7 +667,7 @@ def test_naive_datetime_with_microsecond(self):
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
|
|
||||||
if not isinstance(serializers.get_serializer('yaml'), serializers.BadSerializer):
|
|
||||||
- data = serializers.serialize('yaml', [Event(dt=dt)])
|
|
||||||
+ data = serializers.serialize('yaml', [Event(dt=dt)], default_flow_style=None)
|
|
||||||
self.assert_yaml_contains_datetime(data, "2011-09-01 13:20:30.405060")
|
|
||||||
obj = next(serializers.deserialize('yaml', data)).object
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
@@ -691,7 +691,7 @@ def test_aware_datetime_with_microsecond(self):
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
|
|
||||||
if not isinstance(serializers.get_serializer('yaml'), serializers.BadSerializer):
|
|
||||||
- data = serializers.serialize('yaml', [Event(dt=dt)])
|
|
||||||
+ data = serializers.serialize('yaml', [Event(dt=dt)], default_flow_style=None)
|
|
||||||
self.assert_yaml_contains_datetime(data, "2011-09-01 17:20:30.405060+07:00")
|
|
||||||
obj = next(serializers.deserialize('yaml', data)).object
|
|
||||||
self.assertEqual(obj.dt.replace(tzinfo=UTC), dt)
|
|
||||||
@@ -715,7 +715,7 @@ def test_aware_datetime_in_utc(self):
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
|
|
||||||
if not isinstance(serializers.get_serializer('yaml'), serializers.BadSerializer):
|
|
||||||
- data = serializers.serialize('yaml', [Event(dt=dt)])
|
|
||||||
+ data = serializers.serialize('yaml', [Event(dt=dt)], default_flow_style=None)
|
|
||||||
self.assert_yaml_contains_datetime(data, "2011-09-01 10:20:30+00:00")
|
|
||||||
obj = next(serializers.deserialize('yaml', data)).object
|
|
||||||
self.assertEqual(obj.dt.replace(tzinfo=UTC), dt)
|
|
||||||
@@ -739,7 +739,7 @@ def test_aware_datetime_in_local_timezone(self):
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
|
|
||||||
if not isinstance(serializers.get_serializer('yaml'), serializers.BadSerializer):
|
|
||||||
- data = serializers.serialize('yaml', [Event(dt=dt)])
|
|
||||||
+ data = serializers.serialize('yaml', [Event(dt=dt)], default_flow_style=None)
|
|
||||||
self.assert_yaml_contains_datetime(data, "2011-09-01 13:20:30+03:00")
|
|
||||||
obj = next(serializers.deserialize('yaml', data)).object
|
|
||||||
self.assertEqual(obj.dt.replace(tzinfo=UTC), dt)
|
|
||||||
@@ -763,7 +763,7 @@ def test_aware_datetime_in_other_timezone(self):
|
|
||||||
self.assertEqual(obj.dt, dt)
|
|
||||||
|
|
||||||
if not isinstance(serializers.get_serializer('yaml'), serializers.BadSerializer):
|
|
||||||
- data = serializers.serialize('yaml', [Event(dt=dt)])
|
|
||||||
+ data = serializers.serialize('yaml', [Event(dt=dt)], default_flow_style=None)
|
|
||||||
self.assert_yaml_contains_datetime(data, "2011-09-01 17:20:30+07:00")
|
|
||||||
obj = next(serializers.deserialize('yaml', data)).object
|
|
||||||
self.assertEqual(obj.dt.replace(tzinfo=UTC), dt)
|
|
13
test_clear_site_cache-sort.patch
Normal file
13
test_clear_site_cache-sort.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: Django-2.2/tests/sites_tests/tests.py
|
||||||
|
===================================================================
|
||||||
|
--- Django-2.2.orig/tests/sites_tests/tests.py
|
||||||
|
+++ Django-2.2/tests/sites_tests/tests.py
|
||||||
|
@@ -162,7 +162,7 @@ class SitesFrameworkTests(TestCase):
|
||||||
|
self.assertEqual(models.SITE_CACHE, {})
|
||||||
|
get_current_site(request)
|
||||||
|
expected_cache = {self.site.id: self.site}
|
||||||
|
- self.assertEqual(models.SITE_CACHE, expected_cache)
|
||||||
|
+ self.assertCountEqual(models.SITE_CACHE, expected_cache)
|
||||||
|
|
||||||
|
with self.settings(SITE_ID=''):
|
||||||
|
get_current_site(request)
|
Loading…
x
Reference in New Issue
Block a user