officialcryptomaster / pydex

0x Python Relayer
MIT License
18 stars 4 forks source link

test: web3 url #20

Closed benjiqq closed 5 years ago

benjiqq commented 5 years ago
   @pytest.fixture(scope="session")
    def web3_rpc_url():
        """Web3 RPC URL from WEB3_RPC_URL env var"""
        _web3_rpc_url = os.environ.get("WEB3_RPC_URL")
>       assert _web3_rpc_url, "Please make sure a WEB3_RPC_URL is set"
E       AssertionError: Please make sure a WEB3_RPC_URL is set
E       assert None

tests/conftest.py:79: AssertionError
officialcryptomaster commented 5 years ago

you just need to make sure that environment variable is set to the url of your web3 provider. I might change it to fall back to local ganache...

benjiqq commented 5 years ago

ok, works now. could add to doc maybe later

  1. start ganache-cli
  2. export PRIVATE_KEY="323edb6215bf9c0aaa58b47c7b064c7b21f180aa0920a1cc04abb48c0d1aee93" (took it from ganche output after start)
  3. export WEB3_RPC_URL="localhost:8545"
  4. run test