forked from pool/python-pytest-djangoapp
- Update to 0.15.2:
- Ignore temporary attributes from project settings module (see
gh#idlesign/pytest-djangoapp#21).
- Add django_4.patch making the package compatible with Django
4.* (gh#idlesign/pytest-djangoapp#23).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-djangoapp?expand=0&rev=5
This commit is contained in:
29
django_4.patch
Normal file
29
django_4.patch
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
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:ed10b80ca3bf4c7eb55be209c438582ca6599691d58643d75a5f6f1e7170b149
|
|
||||||
size 26790
|
|
||||||
3
pytest-djangoapp-0.15.2.tar.gz
Normal file
3
pytest-djangoapp-0.15.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:feebdfbed7d919df2b5050c0b40205dfd7896d0d106c378f1111343a5d6f8066
|
||||||
|
size 26901
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 10 20:59:26 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Update to 0.15.2:
|
||||||
|
- Ignore temporary attributes from project settings module (see
|
||||||
|
gh#idlesign/pytest-djangoapp#21).
|
||||||
|
- Add django_4.patch making the package compatible with Django
|
||||||
|
4.* (gh#idlesign/pytest-djangoapp#23).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 13 12:20:59 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
Thu May 13 12:20:59 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-djangoapp
|
# spec file for package python-pytest-djangoapp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 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
|
||||||
@@ -18,13 +18,16 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pytest-djangoapp
|
Name: python-pytest-djangoapp
|
||||||
Version: 0.15.1
|
Version: 0.15.2
|
||||||
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
|
||||||
@@ -44,8 +47,9 @@ BuildRequires: %{python_module pytest}
|
|||||||
A pytest plugin to help with Django pluggable application testing.
|
A pytest plugin to help with Django pluggable application testing.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pytest-djangoapp-%{version}
|
%autosetup -p1 -n pytest-djangoapp-%{version}
|
||||||
# https://github.com/idlesign/pytest-djangoapp/issues/4
|
|
||||||
|
# gh#idlesign/pytest-djangoapp#4
|
||||||
mv ./pytest_djangoapp/tests/conftest.py .
|
mv ./pytest_djangoapp/tests/conftest.py .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|||||||
Reference in New Issue
Block a user