Example #1
0
 def test_transaction_generate_output_same_address(self):
     output = Transaction.generate_output(self.wallet, self.wallet.address,
                                          self.amount)
     self.assertIsInstance(output, dict)
     self.assertTrue(len(output.keys()), 1)
     self.assertEqual(output.get(self.wallet.address), self.wallet.balance)
     self.assertNotEqual(output.get(self.wallet.address), self.amount)
Example #2
0
 def test_transaction_generate_output(self):
     output = Transaction.generate_output(self.wallet, self.recipient,
                                          self.amount)
     self.assertIsInstance(output, dict)
     self.assertTrue(all([isinstance(key, str) for key in output.keys()]))
     self.assertTrue(
         all([isinstance(value, float) for value in output.values()]))