예제 #1
0
 def test_get_set_stored_network(self):
     """Checks default stored network and set method."""
     # checks default
     assert Settings.get_stored_network() == ChainID.MAINNET
     # checks set
     Settings.set_stored_network(ChainID.ROPSTEN)
     assert Settings.get_stored_network() == ChainID.ROPSTEN
예제 #2
0
 def test_is_stored_testnet(self):
     Settings.set_stored_network(ChainID.MAINNET)
     assert Settings.is_stored_testnet() is False
     Settings.set_stored_network(ChainID.ROPSTEN)
     assert Settings.is_stored_testnet() is True
예제 #3
0
 def store_network(self):
     """Saves selected network to the store."""
     network = self.get_ui_network()
     Settings.set_stored_network(network)