def test_syncronize_success(self): """ Contract syncronization success """ my_contract = Contract("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae") self.assertEqual(my_contract.last_syncronization, None) my_contract.syncronize() self.assertNotEqual(my_contract.last_syncronization, None) self.assertTrue(my_contract.last_syncronization < datetime.now())
def test_syncronize_when_contract_not_deployed(self): """ Attempting to sync a contract not deployed should raise an exception """ my_contract = Contract() self.assertEqual(my_contract.last_syncronization, None) with self.assertRaises(ContractNotDeployedException): my_contract.syncronize()