summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/admin/bin/compress.py2
-rw-r--r--tests/view_tests/tests/test_debug.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/bin/compress.py b/django/contrib/admin/bin/compress.py
index 1e699ee73c..97013d61de 100644
--- a/django/contrib/admin/bin/compress.py
+++ b/django/contrib/admin/bin/compress.py
@@ -11,7 +11,7 @@ except ImportError:
else:
closure_compiler = closure.get_jar_filename()
-js_path = Path(__file__).parent.parent / 'static' / 'admin' / 'js'
+js_path = Path(__file__).parents[1] / 'static' / 'admin' / 'js'
def main():
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 73430178d7..8e66bb3a03 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -757,7 +757,7 @@ class PlainTextReportTests(SimpleTestCase):
exc_type, exc_value, tb = sys.exc_info()
reporter = ExceptionReporter(request, exc_type, exc_value, tb)
text = reporter.get_traceback_text()
- templ_path = Path(Path(__file__).parent.parent, 'templates', 'debug', 'template_error.html')
+ templ_path = Path(Path(__file__).parents[1], 'templates', 'debug', 'template_error.html')
self.assertIn(
'Template error:\n'
'In template %(path)s, error at line 2\n'