def METHOD_NAME(self, svc, factories):
    user = factories.User.build()
    with pytest.raises(TypeError) as exc:
        svc.update_preferences(user, foo="bar", baz="qux")
    assert "keys baz, foo are not allowed" in str(exc.value)