mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
This commit is contained in:
@@ -10,7 +10,6 @@ from django.db.models import fields
|
||||
from django.test import SimpleTestCase, modify_settings, override_settings
|
||||
from django.test.utils import captured_stderr
|
||||
from django.urls import reverse
|
||||
from django.utils import six
|
||||
|
||||
from .models import Company, Person
|
||||
from .tests import AdminDocsTestCase, TestDataMixin
|
||||
@@ -53,7 +52,6 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase):
|
||||
self.assertContains(response, 'Views by namespace test')
|
||||
self.assertContains(response, 'Name: <code>test:func</code>.')
|
||||
|
||||
@unittest.skipIf(six.PY2, "Python 2 doesn't support __qualname__.")
|
||||
def test_view_index_with_method(self):
|
||||
"""
|
||||
Views that are methods are listed correctly.
|
||||
@@ -89,7 +87,7 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase):
|
||||
"""
|
||||
url = reverse('django-admindocs-views-detail', args=['django.contrib.admin.sites.AdminSite.index'])
|
||||
response = self.client.get(url)
|
||||
self.assertEqual(response.status_code, 200 if six.PY3 else 404)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
def test_model_index(self):
|
||||
response = self.client.get(reverse('django-admindocs-models-index'))
|
||||
|
||||
Reference in New Issue
Block a user