mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Add some type hints to tests files (#12833)
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
This commit is contained in:
parent
438925c422
commit
444588c5fc
7 changed files with 19 additions and 23 deletions
|
@ -12,6 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import List
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from synapse._scripts.register_new_matrix_user import request_registration
|
||||
|
@ -49,8 +50,8 @@ class RegisterTestCase(TestCase):
|
|||
requests.post = post
|
||||
|
||||
# The fake stdout will be written here
|
||||
out = []
|
||||
err_code = []
|
||||
out: List[str] = []
|
||||
err_code: List[int] = []
|
||||
|
||||
with patch("synapse._scripts.register_new_matrix_user.requests", requests):
|
||||
request_registration(
|
||||
|
@ -85,8 +86,8 @@ class RegisterTestCase(TestCase):
|
|||
requests.get = get
|
||||
|
||||
# The fake stdout will be written here
|
||||
out = []
|
||||
err_code = []
|
||||
out: List[str] = []
|
||||
err_code: List[int] = []
|
||||
|
||||
with patch("synapse._scripts.register_new_matrix_user.requests", requests):
|
||||
request_registration(
|
||||
|
@ -137,8 +138,8 @@ class RegisterTestCase(TestCase):
|
|||
requests.post = post
|
||||
|
||||
# The fake stdout will be written here
|
||||
out = []
|
||||
err_code = []
|
||||
out: List[str] = []
|
||||
err_code: List[int] = []
|
||||
|
||||
with patch("synapse._scripts.register_new_matrix_user.requests", requests):
|
||||
request_registration(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue