FileSystemStorage is cooler than Storage

pull/3/head
Eugen Ciur 2020-05-04 17:34:38 +02:00
parent fd871c59d7
commit d0af1087af
2 changed files with 6 additions and 2 deletions

View File

@ -60,3 +60,7 @@ class Storage:
return os.path.exists(
self.path(_path)
)
class FileSystemStorage(Storage):
pass

View File

@ -2,7 +2,7 @@ import os
import unittest
from mglib.test.utils import TemporaryNode
from mglib.path import DocumentPath
from mglib.storage import Storage
from mglib.storage import FileSystemStorage
BASE_DIR = os.path.dirname(
@ -16,7 +16,7 @@ MEDIA_ROOT = os.path.join(
class TestStorage(unittest.TestCase):
def test_delete(self):
storage = Storage(location=MEDIA_ROOT)
storage = FileSystemStorage(location=MEDIA_ROOT)
with TemporaryNode(MEDIA_ROOT) as media_root:
docs = media_root.add_folder("docs")