1
0
mirror of https://github.com/django/django.git synced 2025-10-30 00:56:09 +00:00

Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.

These functions do nothing on Python 3.
This commit is contained in:
Tim Graham
2017-01-20 08:01:02 -05:00
committed by GitHub
parent ec4c1d6717
commit 4e729feaa6
64 changed files with 108 additions and 178 deletions

View File

@@ -8,7 +8,6 @@ from django.contrib.sitemaps import GenericSitemap, Sitemap
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from django.test import modify_settings, override_settings
from django.utils._os import upath
from django.utils.formats import localize
from django.utils.translation import activate, deactivate
@@ -30,7 +29,7 @@ class HTTPSitemapTests(SitemapTestsBase):
@override_settings(TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(os.path.dirname(upath(__file__)), 'templates')],
'DIRS': [os.path.join(os.path.dirname(__file__), 'templates')],
}])
def test_simple_sitemap_custom_index(self):
"A simple sitemap index can be rendered with a custom template"
@@ -65,7 +64,7 @@ class HTTPSitemapTests(SitemapTestsBase):
@override_settings(TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(os.path.dirname(upath(__file__)), 'templates')],
'DIRS': [os.path.join(os.path.dirname(__file__), 'templates')],
}])
def test_simple_custom_sitemap(self):
"A simple sitemap can be rendered with a custom template"