mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-20 22:40:22 -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
|
@ -61,7 +61,7 @@ class CasHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# stub out the auth handler
|
||||
auth_handler = self.hs.get_auth_handler()
|
||||
auth_handler.complete_sso_login = simple_async_mock()
|
||||
auth_handler.complete_sso_login = simple_async_mock() # type: ignore[assignment]
|
||||
|
||||
cas_response = CasResponse("test_user", {})
|
||||
request = _mock_request()
|
||||
|
@ -89,7 +89,7 @@ class CasHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# stub out the auth handler
|
||||
auth_handler = self.hs.get_auth_handler()
|
||||
auth_handler.complete_sso_login = simple_async_mock()
|
||||
auth_handler.complete_sso_login = simple_async_mock() # type: ignore[assignment]
|
||||
|
||||
# Map a user via SSO.
|
||||
cas_response = CasResponse("test_user", {})
|
||||
|
@ -129,7 +129,7 @@ class CasHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# stub out the auth handler
|
||||
auth_handler = self.hs.get_auth_handler()
|
||||
auth_handler.complete_sso_login = simple_async_mock()
|
||||
auth_handler.complete_sso_login = simple_async_mock() # type: ignore[assignment]
|
||||
|
||||
cas_response = CasResponse("föö", {})
|
||||
request = _mock_request()
|
||||
|
@ -160,7 +160,7 @@ class CasHandlerTestCase(HomeserverTestCase):
|
|||
|
||||
# stub out the auth handler
|
||||
auth_handler = self.hs.get_auth_handler()
|
||||
auth_handler.complete_sso_login = simple_async_mock()
|
||||
auth_handler.complete_sso_login = simple_async_mock() # type: ignore[assignment]
|
||||
|
||||
# The response doesn't have the proper userGroup or department.
|
||||
cas_response = CasResponse("test_user", {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue