forked from pool/python-Django
- Update to 2.2.8
* CVE-2019-19118: Privilege escalation in the Django admin (boo#1157705)
* Fixed a data loss possibility in the admin changelist view when a
custom formset’s prefix contains regular expression special
characters, e.g. '$'
* Fixed a regression in Django 2.2.1 that caused a crash when
migrating permissions for proxy models with a multiple database
setup if the default entry was empty
* Fixed a data loss possibility in the select_for_update(). When
using 'self' in the of argument with multi-table inheritance, a
parent model was locked instead of the queryset’s model
- Add patch fix-selenium-test.patch to fix a test when selenium is
missing
OBS-URL: https://build.opensuse.org/request/show/752866
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-Django?expand=0&rev=45
20 lines
980 B
Diff
20 lines
980 B
Diff
Index: Django-2.2.8/tests/admin_inlines/tests.py
|
|
===================================================================
|
|
--- Django-2.2.8.orig/tests/admin_inlines/tests.py
|
|
+++ Django-2.2.8/tests/admin_inlines/tests.py
|
|
@@ -1,5 +1,3 @@
|
|
-from selenium.common.exceptions import NoSuchElementException
|
|
-
|
|
from django.contrib.admin import ModelAdmin, TabularInline
|
|
from django.contrib.admin.helpers import InlineAdminForm
|
|
from django.contrib.admin.tests import AdminSeleniumTestCase
|
|
@@ -1050,6 +1048,8 @@ class SeleniumTests(AdminSeleniumTestCas
|
|
self.assertEqual(Profile.objects.all().count(), 3)
|
|
|
|
def test_add_inline_link_absent_for_view_only_parent_model(self):
|
|
+ from selenium.common.exceptions import NoSuchElementException
|
|
+
|
|
user = User.objects.create_user('testing', password='password', is_staff=True)
|
|
user.user_permissions.add(
|
|
Permission.objects.get(codename='view_poll', content_type=ContentType.objects.get_for_model(Poll))
|