forked from pool/python-pytest-djangoapp
- update to 1.2.0:
* Add 'liveserver' and 'liveclient' fixtures (closes #24). * Added 'command_makemigrations' fixture. * Added 'conf_app_name' fixture (see #17). * Fixture 'template_context' now accepts a username. * Dropped support for Django 1.7. * Dropped support for Py2. Py3.6+ specific syntax is introduced. Code update may be required. * Introduced new 'check_migrations' fixture. - drop django_4.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-djangoapp?expand=0&rev=8
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
pytest_djangoapp/tests/testapp/urls.py | 6 ++++--
|
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/pytest_djangoapp/tests/testapp/urls.py
|
|
||||||
+++ b/pytest_djangoapp/tests/testapp/urls.py
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-from django.conf.urls import url
|
|
||||||
+from django.urls import re_path as url
|
|
||||||
from django.http import HttpResponse
|
|
||||||
|
|
||||||
from pytest_djangoapp.compat import get_urlpatterns
|
|
||||||
@@ -7,13 +7,15 @@ from pytest_djangoapp.compat import get_
|
|
||||||
def raise_exception(request):
|
|
||||||
raise Exception('This one should be handled by 500 technical view')
|
|
||||||
|
|
||||||
+def is_ajax(req):
|
|
||||||
+ return req.headers.get('x-requested-with') == 'XMLHttpRequest'
|
|
||||||
|
|
||||||
def index(request, some_id):
|
|
||||||
|
|
||||||
if request.method == 'POST':
|
|
||||||
return HttpResponse('json')
|
|
||||||
|
|
||||||
- if request.is_ajax():
|
|
||||||
+ if is_ajax(request):
|
|
||||||
return HttpResponse('ajaxed')
|
|
||||||
|
|
||||||
from django.templatetags.static import static
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:feebdfbed7d919df2b5050c0b40205dfd7896d0d106c378f1111343a5d6f8066
|
|
||||||
size 26901
|
|
||||||
3
pytest-djangoapp-1.2.0.tar.gz
Normal file
3
pytest-djangoapp-1.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:249706b88ac816c0f37306565556ce6f106ad1011bf5f28ba060df83d417376d
|
||||||
|
size 32359
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 24 18:55:24 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.2.0:
|
||||||
|
* Add 'liveserver' and 'liveclient' fixtures (closes #24).
|
||||||
|
* Added 'command_makemigrations' fixture.
|
||||||
|
* Added 'conf_app_name' fixture (see #17).
|
||||||
|
* Fixture 'template_context' now accepts a username.
|
||||||
|
* Dropped support for Django 1.7.
|
||||||
|
* Dropped support for Py2. Py3.6+ specific syntax is
|
||||||
|
introduced. Code update may be required.
|
||||||
|
* Introduced new 'check_migrations' fixture.
|
||||||
|
- drop django_4.patch (upstream)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 17 05:37:40 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
Thu Mar 17 05:37:40 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-djangoapp
|
# spec file for package python-pytest-djangoapp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,18 +16,15 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pytest-djangoapp
|
Name: python-pytest-djangoapp
|
||||||
Version: 0.15.2
|
Version: 1.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Pytest plugin for Django pluggable application testing
|
Summary: Pytest plugin for Django pluggable application testing
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/idlesign/pytest-djangoapp
|
URL: https://github.com/idlesign/pytest-djangoapp
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-djangoapp/pytest-djangoapp-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-djangoapp/pytest-djangoapp-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM django_4.patch gh#idlesign/pytest-djangoapp#23 mcepl@suse.com
|
|
||||||
# this patch makes things totally awesome
|
|
||||||
Patch0: django_4.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
|||||||
Reference in New Issue
Block a user