diff --git a/tests/conftest.py b/tests/conftest.py index 76d39d30..f985a287 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -139,6 +139,6 @@ def mint(): server = UvicornServer(config=config) server.start() - time.sleep(1) + time.sleep(5) yield server server.stop() diff --git a/tests/test_dlc.py b/tests/test_dlc.py index 0a7d3321..a07b894f 100644 --- a/tests/test_dlc.py +++ b/tests/test_dlc.py @@ -310,8 +310,8 @@ async def test_registration_vanilla_proofs(wallet: Wallet, ledger: Ledger): response = await ledger.register_dlc(request) assert len(response.funded) == 1, "Funding proofs len != 1" - funding_proof = response.funded[0] - assert verify_dlc_signature(dlc_root, 64, bytes.fromhex(funding_proof.signature), pubkey),\ + ack = response.funded[0] + assert verify_dlc_signature(dlc_root, 64, bytes.fromhex(ack.funding_proof.signature), pubkey),\ "Could not verify funding proof" @pytest.mark.asyncio @@ -345,8 +345,8 @@ async def test_registration_dlc_locked_proofs(wallet: Wallet, ledger: Ledger): assert response.errors is None, f"Funding proofs error: {response.errors[0].bad_inputs}" assert len(response.funded) == 1, "Funding proofs len != 1" - funding_proof = response.funded[0] - assert verify_dlc_signature(dlc_root, 64, bytes.fromhex(funding_proof.signature), pubkey), \ + ack = response.funded[0] + assert verify_dlc_signature(dlc_root, 64, bytes.fromhex(ack.funding_proof.signature), pubkey), \ "Could not verify funding proof" @@ -508,7 +508,7 @@ async def test_settle_dlc(wallet: Wallet, ledger: Ledger): request = PostDlcRegistrationRequest(registrations=[dlc]) response = await ledger.register_dlc(request) - assert response.errors is None, f"Funding proofs error: {response.errors[0].bad_inputs}" + assert response.errors is None, f"Funding proofs error: {response.errors[0].bad_inputs}" outcome = DlcOutcome( P=json.dumps(payouts[1]), @@ -558,7 +558,7 @@ async def test_settle_dlc_timeout(wallet: Wallet, ledger: Ledger): request = PostDlcRegistrationRequest(registrations=[dlc]) response = await ledger.register_dlc(request) - assert response.errors is None, f"Funding proofs error: {response.errors[0].bad_inputs}" + assert response.errors is None, f"Funding proofs error: {response.errors[0].bad_inputs}" outcome = DlcOutcome( P=json.dumps(payouts[2]), @@ -574,4 +574,4 @@ async def test_settle_dlc_timeout(wallet: Wallet, ledger: Ledger): response = await ledger.settle_dlc(request) assert response.errors is None, f"Response contains errors: {response.errors}" - assert len(response.settled) > 0, "Response contains zero settlements." \ No newline at end of file + assert len(response.settled) > 0, "Response contains zero settlements."