diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-10-07 12:03:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 12:03:26 +0100 |
commit | 4f0637346a194a3343b4fea6cf38c1548e56648d (patch) | |
tree | f0aec40f179e6cb5648df8797e4c15e791e37ec6 /tests | |
parent | Remove docs/sphinx and related references (#8480) (diff) | |
download | synapse-4f0637346a194a3343b4fea6cf38c1548e56648d.tar.xz |
Combine `SpamCheckerApi` with the more generic `ModuleApi`. (#8464)
Lots of different module apis is not easy to maintain. Rather than adding yet another ModuleApi(hs, hs.get_auth_handler()) incantation, first add an hs.get_module_api() method and use it where possible.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/module_api/test_api.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/module_api/test_api.py b/tests/module_api/test_api.py index 54600ad983..7c790bee7d 100644 --- a/tests/module_api/test_api.py +++ b/tests/module_api/test_api.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from synapse.module_api import ModuleApi + from synapse.rest import admin from synapse.rest.client.v1 import login, room @@ -28,7 +28,7 @@ class ModuleApiTestCase(HomeserverTestCase): def prepare(self, reactor, clock, homeserver): self.store = homeserver.get_datastore() - self.module_api = ModuleApi(homeserver, homeserver.get_auth_handler()) + self.module_api = homeserver.get_module_api() def test_can_register_user(self): """Tests that an external module can register a user""" |