Esempio n. 1
0
 def contract_backend_configs(self):
     backend_configs = self.config.get_config('contracts.backends')
     sorted_backend_configs = sort_prioritized_configs(
         backend_configs, self.project.config)
     for backend_name, base_backend_config in sorted_backend_configs.items(
     ):
         yield backend_name, ContractBackendConfig(base_backend_config)
Esempio n. 2
0
def test_set_backend_class_api(value, expected):
    chain_config = ContractBackendConfig()
    chain_config.set_backend_class(value)
    assert chain_config['class'] == expected
Esempio n. 3
0
def test_backend_class_property():
    contract_backend_config = ContractBackendConfig({
        'class':
        'populus.contracts.backends.memory.MemoryBackend',
    })
    assert contract_backend_config.backend_class is MemoryBackend
Esempio n. 4
0
def test_priority_property():
    contract_backend_config = ContractBackendConfig({'priority': 10})
    assert contract_backend_config.priority == 10
def test_set_backend_class_api(value, expected):
    chain_config = ContractBackendConfig()
    chain_config.set_backend_class(value)
    assert chain_config['class'] == expected