Fix mocked functions assert_called_with
parent
7f13aa702a
commit
9b9a7bddc4
|
@ -282,7 +282,11 @@ class AuthTestCase(unittest.TestCase):
|
|||
)
|
||||
)
|
||||
self.store.add_access_token_to_user.assert_called_with(
|
||||
USER_ID, token, "DEVICE", None
|
||||
user_id=USER_ID,
|
||||
token=token,
|
||||
device_id="DEVICE",
|
||||
valid_until_ms=None,
|
||||
puppets_user_id=None,
|
||||
)
|
||||
|
||||
def get_user(tok):
|
||||
|
|
|
@ -94,12 +94,13 @@ class ModuleApiTestCase(HomeserverTestCase):
|
|||
self.assertFalse(hasattr(event, "state_key"))
|
||||
self.assertDictEqual(event.content, content)
|
||||
|
||||
expected_requester = create_requester(
|
||||
user_id, authenticated_entity=self.hs.hostname
|
||||
)
|
||||
|
||||
# Check that the event was sent
|
||||
self.event_creation_handler.create_and_send_nonmember_event.assert_called_with(
|
||||
create_requester(user_id),
|
||||
event_dict,
|
||||
ratelimit=False,
|
||||
ignore_shadow_ban=True,
|
||||
expected_requester, event_dict, ratelimit=False, ignore_shadow_ban=True,
|
||||
)
|
||||
|
||||
# Create and send a state event
|
||||
|
@ -128,7 +129,7 @@ class ModuleApiTestCase(HomeserverTestCase):
|
|||
|
||||
# Check that the event was sent
|
||||
self.event_creation_handler.create_and_send_nonmember_event.assert_called_with(
|
||||
create_requester(user_id),
|
||||
expected_requester,
|
||||
{
|
||||
"type": "m.room.power_levels",
|
||||
"content": content,
|
||||
|
|
Loading…
Reference in New Issue