Esempio n. 1
0
def test_global_url_propagates_to_parties():
    config = NetworkConfig.parse_kwargs(url='http://nowhere/')
    network = Network()
    network.set_config(config)
    client = network.aio_party('Bob')
    party_config = client.resolved_config()
    assert party_config.url == 'http://nowhere/'
Esempio n. 2
0
def test_party_config_allows_list():
    config = NetworkConfig.parse_kwargs(parties=['Bob'], participant_url='http://nowhere/')
    assert config.parties[0].party == Party('Bob')
    assert config.parties[0].url == 'http://nowhere/'
Esempio n. 3
0
def test_party_config_allows_single_string():
    config = NetworkConfig.parse_kwargs(parties='Bob', participant_url='http://nowhere/')
    assert config.parties[0].party == Party('Bob')
    assert config.parties[0].url == 'http://nowhere/'
Esempio n. 4
0
def test_party_config_allows_list():
    config = NetworkConfig.parse_kwargs(parties=["Bob"], url="http://nowhere/")
    assert config.parties[0].party == Party("Bob")
    assert config.parties[0].url == "http://nowhere/"
Esempio n. 5
0
def test_party_config_allows_single_string():
    config = NetworkConfig.parse_kwargs(parties="Bob", url="http://nowhere/")
    assert config.parties[0].party == Party("Bob")
    assert config.parties[0].url == "http://nowhere/"
 def test_party_config_allows_list(self):
     config = NetworkConfig.parse_kwargs(parties=['Bob'],
                                         participant_url='http://nowhere/')
     self.assertEqual(config.parties[0].party, Party('Bob'))
     self.assertEqual(config.parties[0].url, 'http://nowhere/')