def test_unknownShell(self):
        """
        Using an unknown shellType should raise NotImplementedError
        """
        classes = [usage.Completer, usage.CompleteFiles,
                   usage.CompleteDirs, usage.CompleteList,
                   usage.CompleteMultiList, usage.CompleteUsernames,
                   usage.CompleteGroups, usage.CompleteHostnames,
                   usage.CompleteUserAtHost, usage.CompleteNetInterfaces]

        for cls in classes:
            try:
                action = cls()
            except:
                action = cls(None)
            self.assertRaises(NotImplementedError, action._shellCode,
                              None, "bad_shell_type")

        Using an unknown shellType should raise NotImplementedError
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_usage.py