Rename files interface class
This commit is contained in:
parent
d6ff3406ef
commit
d07cb11b78
@ -1,4 +1,4 @@
|
|||||||
from .files import RackspaceFiles
|
from .files import RackspaceFileProvider
|
||||||
|
|
||||||
|
|
||||||
class MockCSP:
|
class MockCSP:
|
||||||
@ -8,4 +8,4 @@ class MockCSP:
|
|||||||
|
|
||||||
|
|
||||||
def make_csp_provider(app):
|
def make_csp_provider(app):
|
||||||
app.csp = MockCSP(RackspaceFiles(app))
|
app.csp = MockCSP(RackspaceFileProvider(app))
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from atst.uploader import Uploader
|
from atst.uploader import Uploader
|
||||||
|
|
||||||
|
|
||||||
class Files:
|
class FileProviderInterface:
|
||||||
def upload(self, fyle): # pragma: no cover
|
def upload(self, fyle): # pragma: no cover
|
||||||
"""Store the file object `fyle` in the CSP. This method returns the
|
"""Store the file object `fyle` in the CSP. This method returns the
|
||||||
object name that can be used to later look up the file."""
|
object name that can be used to later look up the file."""
|
||||||
@ -14,7 +14,7 @@ class Files:
|
|||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
class RackspaceFiles(Files):
|
class RackspaceFileProvider(FileProviderInterface):
|
||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
self.uploader = Uploader(
|
self.uploader = Uploader(
|
||||||
provider=app.config.get("STORAGE_PROVIDER"),
|
provider=app.config.get("STORAGE_PROVIDER"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user