summary refs log tree commit diff
path: root/tests/rest/media
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-02-05 12:44:03 +0000
committerErik Johnston <erik@matrix.org>2018-02-05 12:44:03 +0000
commita1beca0e254104ad87220d276fb56d26e5ca5809 (patch)
tree6404f607063bcd6af0c752a4f9e29899fc294b6c /tests/rest/media
parentAdd .vscode to gitignore (diff)
downloadsynapse-a1beca0e254104ad87220d276fb56d26e5ca5809.tar.xz
Fix broken unit test for media storage
Diffstat (limited to 'tests/rest/media')
-rw-r--r--tests/rest/media/v1/test_media_storage.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/rest/media/v1/test_media_storage.py b/tests/rest/media/v1/test_media_storage.py
index c4de181579..eef38b6781 100644
--- a/tests/rest/media/v1/test_media_storage.py
+++ b/tests/rest/media/v1/test_media_storage.py
@@ -21,6 +21,8 @@ from synapse.rest.media.v1.media_storage import MediaStorage
 from synapse.rest.media.v1.filepath import MediaFilePaths
 from synapse.rest.media.v1.storage_provider import FileStorageProviderBackend
 
+from mock import Mock
+
 from tests import unittest
 
 import os
@@ -35,8 +37,11 @@ class MediaStorageTests(unittest.TestCase):
         self.primary_base_path = os.path.join(self.test_dir, "primary")
         self.secondary_base_path = os.path.join(self.test_dir, "secondary")
 
+        hs = Mock()
+        hs.config.media_store_path = self.primary_base_path
+
         storage_providers = [FileStorageProviderBackend(
-            self.primary_base_path, self.secondary_base_path
+            hs, self.secondary_base_path
         )]
 
         self.filepaths = MediaFilePaths(self.primary_base_path)