1
0
mirror of https://github.com/django/django.git synced 2025-05-19 21:36:29 +00:00

22 lines
468 B
Python

from django.utils import unittest
from django.utils._os import safe_join
class SafeJoinTests(unittest.TestCase):
def test_base_path_ends_with_sep(self):
self.assertEqual(
safe_join("/abc/", "abc"),
"/abc/abc",
)
def test_root_path(self):
self.assertEqual(
safe_join("/", "path"),
"/path",
)
self.assertEqual(
safe_join("/", ""),
"/",
)