def METHOD_NAME(self):
    """
    Test __str__ method, for full coverage and check that all modules have
    required attributes.
    """
    for mod in self.allmods:
        if "__str__" not in mod.__dict__:
            continue
        with RedirectStreams(stdout=self.dev_null):
            obj = mod()
        original_stdout = sys.stdout
        sys.stdout = StringIO()
        # call __str__ method
        result = obj.__str__()
        # examine what was printed
        contents = sys.stdout.getvalue()
        self.assertEqual(type(contents), type(""))
        # attributes from ICD
        self.assertIn(
            "_outspec", contents, "_outspec missing for %s" % mod.__name__
        )
        sys.stdout.close()
        # it also returns a string, which is not necessary
        self.assertEqual(type(result), type(""))
        # put stdout back
        sys.stdout = original_stdout