From c7eb60619f0be7db3d82531b70d410393192ba33 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 10 Sep 2020 17:19:41 -0300 Subject: [PATCH] separate test for not found message --- tests/integration/blockchain/test_blockchain.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/integration/blockchain/test_blockchain.py b/tests/integration/blockchain/test_blockchain.py index 2782fe7b7..9e74fa642 100644 --- a/tests/integration/blockchain/test_blockchain.py +++ b/tests/integration/blockchain/test_blockchain.py @@ -912,8 +912,13 @@ class TestGeneralBlockchainSync(SyncingBlockchainTestCase): claim = resolutions[0][0] self.assertTrue(claim.is_signed_by(claim.channel, self.chain.ledger)) + async def test_resolve_not_found(self): + await self.get_claim(await self.create_claim(claim_id_startswith='ab', is_channel=True)) + await self.generate(1) resolutions = Outputs.from_base64(await self.db.protobuf_resolve(["@foo#ab/notfound"])) - self.assertEqual(len(resolutions.txs), 0) + self.assertEqual(resolutions.txos[0].error.text, "Could not find claim at \"@foo#ab/notfound\".") + resolutions = Outputs.from_base64(await self.db.protobuf_resolve(["@notfound#ab/notfound"])) + self.assertEqual(resolutions.txos[0].error.text, "Could not find channel in \"@notfound#ab/notfound\".") class TestClaimtrieSync(SyncingBlockchainTestCase):