def test_invalidApplication(self):
        """
        If I{--wsgi} is given an invalid name, L{Options.parseOptions}
        raises L{UsageError}.
        """
        options = Options()
        for name in [__name__ + '.nosuchthing', 'foo.']:
            exc = self.assertRaises(
                UsageError, options.parseOptions, ['--wsgi', name])
            self.assertEqual(str(exc),
                             "No such WSGI application: %r" % (name,))

        If I{--wsgi} is given an invalid name, L{Options.parseOptions}
        raises L{UsageError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_tap.py