Complete the code to assert that the transaction was successful.
assert transaction.status == [1]The assertion checks if the transaction status is True, meaning it succeeded.
Complete the code to assert the balance increased by the expected amount.
assert new_balance == old_balance + [1]The balance should increase by the amount transferred, not fees or other values.
Fix the error in the assertion that checks the event log contains the expected event.
assert [1] in transaction.events
The assertion must check if the expected_event is in the transaction's events list.
Fill both blanks to assert the smart contract's state variable equals the expected value after the call.
assert contract.[1] == [2]
The assertion compares the contract's stateVariable to the expectedValue after execution.
Fill all three blanks to assert the transaction reverted with the expected error message.
with pytest.raises([1]) as excinfo: contract.call_function() assert [2] in str(excinfo.[3])
The code asserts that a VirtualMachineError is raised, and the error message contains "revert". The exception message is accessed via excinfo.value.