Added missing path() method

This commit is contained in:
Tris
2022-10-19 09:02:34 +11:00
parent 845762400f
commit 4284b4a05f
2 changed files with 13 additions and 2 deletions
+8
View File
@@ -2,6 +2,7 @@ from django.test import TestCase
from byostorage.multi import MultiStorage
from django.core.files.storage import FileSystemStorage
import os.path
class MultiStorageTestCase(TestCase):
@@ -34,3 +35,10 @@ class MultiStorageTestCase(TestCase):
})
self.assertEqual(ms.url('https://google.com'), 'https://google.com')
def test_local_methods(self):
ms = MultiStorage({
'local': {'storage': 'django.core.files.storage.FileSystemStorage', 'location': 'local_store'}
})
self.assertEqual(ms.path('local:foo/bar.txt'), os.path.realpath('local_store/foo/bar.txt'))