def test_validate_cmd_settings(): cmd_settings = """ port: 1 gas_limit: 2 block_time: 3 chain_id: 555 network_id: 444 time: 2019-04-05T14:30:11 accounts: 4 evm_version: istanbul mnemonic: brownie account_keys_path: ../../ fork: main """ cmd_settings_dict = yaml.safe_load(cmd_settings) valid_dict = _validate_cmd_settings(cmd_settings_dict) for (k, v) in cmd_settings_dict.items(): assert valid_dict[k] == v
def test_raise_validate_cmd_settings(invalid_setting): with pytest.raises(TypeError): _validate_cmd_settings(invalid_setting)