From d0af1087af704aedba8935bdb73814f1f351eae7 Mon Sep 17 00:00:00 2001 From: Eugen Ciur Date: Mon, 4 May 2020 17:34:38 +0200 Subject: [PATCH] FileSystemStorage is cooler than Storage --- mglib/storage.py | 4 ++++ test/test_storage.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mglib/storage.py b/mglib/storage.py index 4c29bc2..0f404c7 100644 --- a/mglib/storage.py +++ b/mglib/storage.py @@ -60,3 +60,7 @@ class Storage: return os.path.exists( self.path(_path) ) + + +class FileSystemStorage(Storage): + pass diff --git a/test/test_storage.py b/test/test_storage.py index c12dcaa..37be6d2 100644 --- a/test/test_storage.py +++ b/test/test_storage.py @@ -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")