Beispiel #1
0
 def deserialize_own_user_update_event(
         self, shard: gateway_shard.GatewayShard,
         payload: data_binding.JSONObject
 ) -> user_events.OwnUserUpdateEvent:
     return user_events.OwnUserUpdateEvent(
         app=self._app,
         shard=shard,
         user=self._app.entity_factory.deserialize_my_user(payload))
Beispiel #2
0
 def deserialize_own_user_update_event(
     self,
     shard: gateway_shard.GatewayShard,
     payload: data_binding.JSONObject,
     *,
     old_user: typing.Optional[user_models.OwnUser],
 ) -> user_events.OwnUserUpdateEvent:
     return user_events.OwnUserUpdateEvent(
         app=self._app, shard=shard, user=self._app.entity_factory.deserialize_my_user(payload), old_user=old_user
     )
Beispiel #3
0
 def event(self):
     return user_events.OwnUserUpdateEvent(shard=None, old_user=None, user=mock.Mock())