def test_noOpaque(self):
        """
        L{DigestCredentialFactory.decode} raises L{LoginFailed} if the response
        has no opaque.
        """
        e = self.assertRaises(
            LoginFailed,
            self.credentialFactory.decode,
            self.formatResponse(),
            self.method, self.clientAddress.host)
        self.assertEqual(str(e), "Invalid response, no opaque given.")

        L{DigestCredentialFactory.decode} raises L{LoginFailed} if the response
        has no opaque.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/cred/test/test_digestauth.py