def METHOD_NAME(
    self, schema, user, models, password_updated, pyramid_csrf_request, serializer
):
    user.password_updated = password_updated
    appstruct = schema.deserialize({"user": "encoded_token", "password": "secret"})
    models.User.get_by_username.assert_called_once_with(
        pyramid_csrf_request.db,
        serializer.loads.return_value[0],
        pyramid_csrf_request.default_authority,
    )
    assert appstruct["user"] == user