def METHOD_NAME(self, allow_flagging, called):
    flagging.FlagMethod.__init__ = MagicMock()
    flagging.FlagMethod.__init__.return_value = None
    gr.Interface(lambda x: x, "text", "text", allow_flagging=allow_flagging)
    assert flagging.FlagMethod.__init__.called == called