def test_logFormatInvalid(self):
        """
        L{TwistOptions.opt_log_format} given an invalid format name raises
        L{UsageError}.
        """
        options = TwistOptions()

        self.assertRaises(UsageError, options.opt_log_format, "frommage")

        L{TwistOptions.opt_log_format} given an invalid format name raises
        L{UsageError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/twist/test/test_options.py