'L{DigestCredentialFactory.decode} returns an L{IUsernameHashedPassword}
provider which rejects a correct password for the given user if the
challenge response request is made using a different HTTP method than
was used to request the initial challenge.'

def test_failsWithDifferentMethod(self):

    challenge = self.credentialFactory.getChallenge(self.clientAddress.host)
    nc = '00000001'
    clientResponse = self.formatResponse(nonce=challenge['nonce'], response=self.getDigestResponse(challenge, nc), nc=nc, opaque=challenge['opaque'])
    creds = self.credentialFactory.decode(clientResponse, 'POST', self.clientAddress.host)
    self.assertFalse(creds.checkPassword(self.password))
    self.assertFalse(creds.checkPassword((self.password + 'wrong')))
