Added missing path() method
This commit is contained in:
@@ -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'))
|
||||
Reference in New Issue
Block a user