def badKeyTest(self, cls, prefix):
        """
        If the key portion of the entry is valid base64, but is not actually an
        SSH key, C{fromString} should raise L{BadKeyError}.
        """
        self.assertRaises(BadKeyError, cls.fromString, b' '.join(
                [prefix, b"ssh-rsa", b2a_base64(
                    b"Hey, this isn't an SSH key!").strip()]))

        If the key portion of the entry is valid base64, but is not actually an
        SSH key, C{fromString} should raise L{BadKeyError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_knownhosts.py