mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 17:54:48 -04:00
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.
This commit is contained in:
parent
01f82bfe32
commit
4f0637346a
10 changed files with 51 additions and 58 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue