mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 01:45:04 -04:00
Add final type hint to tests.unittest. (#15072)
Adds a return type to HomeServerTestCase.make_homeserver and deal with any variables which are no longer Any.
This commit is contained in:
parent
119e0795a5
commit
42aea0d8af
55 changed files with 433 additions and 320 deletions
|
@ -14,6 +14,7 @@
|
|||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from synapse.storage.database import make_conn
|
||||
from synapse.storage.engines import PostgresEngine
|
||||
from synapse.storage.engines._base import IncorrectDatabaseSetup
|
||||
|
||||
from tests.unittest import HomeserverTestCase
|
||||
|
@ -38,6 +39,7 @@ class UnsafeLocaleTest(HomeserverTestCase):
|
|||
|
||||
def test_safe_locale(self) -> None:
|
||||
database = self.hs.get_datastores().databases[0]
|
||||
assert isinstance(database.engine, PostgresEngine)
|
||||
|
||||
db_conn = make_conn(database._database_config, database.engine, "test_unsafe")
|
||||
with db_conn.cursor() as txn:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue