Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pytest
- """from brownie import accounts"""
- @pytest.fixture
- def foo(FooCoin,accounts):
- return FooCoin.deploy(10000,"FooCoin", "FCN", 18, {'from': accounts[0]})
- def test_transfer(foo):
- foo.transfer(accounts[1],2,{'from': accounts[0]})
- assert foo.balanceOf(accounts[0]) == 9998
- """ WILL TROW THE FOLLOWING ERROR """
- tests/test_deployfoocoin.py F [100%]
- ====================================================================== FAILURES =======================================================================
- ____________________________________________________________________ test_transfer ____________________________________________________________________
- foo = <FooCoin Contract '0x602C71e4DAC47a042Ee7f46E0aee17F94A3bA0B6'>
- def test_transfer(foo):
- > foo.transfer(accounts[1],2,{'from': accounts[0]})
- E NameError: name 'accounts' is not defined
- tests/test_deployfoocoin.py:11: NameError
- ============================================================= 1 failed, 1 passed in 2.30s =============================================================
Advertisement
Add Comment
Please, Sign In to add comment