Exemple #1
0
def test_chain_should_report_unknown_chains_as_unknown():
    # given
    web3 = mocked_web3(
        block_0_hash=
        "0x0000000000011111111222222333333333333555555555555666666444444333")

    # expect
    assert chain(web3) == "unknown"
Exemple #2
0
def test_chain_should_recognize_morden():
    # given
    web3 = mocked_web3(
        block_0_hash=
        "0x0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303")

    # expect
    assert chain(web3) == "morden"
Exemple #3
0
def test_chain_should_recognize_kovan():
    # given
    web3 = mocked_web3(
        block_0_hash=
        "0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9")

    # expect
    assert chain(web3) == "kovan"
Exemple #4
0
def test_chain_should_recognize_ropsten():
    # given
    web3 = mocked_web3(
        block_0_hash=
        "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")

    # expect
    assert chain(web3) == "ropsten"
Exemple #5
0
def test_chain_should_recognize_ethlive():
    # given
    web3 = mocked_web3(
        block_0_hash=
        "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")

    # expect
    assert chain(web3) == "ethlive"