def test_fingerprintBadFormat(self):
        """
        A C{BadFingerPrintFormat} error is raised when unsupported
        formats are requested.
        """
        with self.assertRaises(keys.BadFingerPrintFormat) as em:
            keys.Key(self.rsaObj).fingerprint('sha256-base')
        self.assertEqual('Unsupported fingerprint format: sha256-base',
            em.exception.args[0])

        A C{BadFingerPrintFormat} error is raised when unsupported
        formats are requested.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_keys.py