def test_is_match_with_arbitrary_data(self): exp = ExpectChangeCipherSpec() msg = Message(ContentType.change_cipher_spec, bytearray([243])) self.assertTrue(exp.is_match(msg))
def test_is_match_with_unmatching_content_type(self): exp = ExpectChangeCipherSpec() msg = Message(ContentType.application_data, bytearray([0])) self.assertFalse(exp.is_match(msg))
def test_is_match(self): exp = ExpectChangeCipherSpec() msg = Message(ContentType.change_cipher_spec, bytearray([0])) self.assertTrue(exp.is_match(msg))