def test_returns_false_for_unverified_data(self): adaptor = RSAAdaptor({"key1": crypto_fixture.passphrase_pubkey}) self.assertFalse(adaptor.verify( crypto_fixture.sample_data, crypto_fixture.signatures["sample_data"]["valid_key"] ))
def test_verifies_data(self): adaptor = RSAAdaptor({"key1": crypto_fixture.valid_pubkey}) self.assertEqual("key1", adaptor.verify( crypto_fixture.sample_data, crypto_fixture.signatures["sample_data"]["valid_key"] ))