def refill_addresses_queue(self): self.assertEqual(len(Address.objects.all()), 0) with patch('cc.tasks.AuthServiceProxy', self.mock): tasks.refill_addresses_queue() self.assertEqual(len(Address.objects.all()), settings.CC_ADDRESS_QUEUE)
def create_customer_data(sender, instance, created, **kwargs): if created: refill_addresses_queue() wallet = Wallet(currency=Currency.objects.get(ticker='LTC')) wallet.get_address() wallet.save() Customer.objects.create(user=instance, wallet=wallet)
def setUp(self): self.currency = Currency.objects.create(label='Dash regtest', ticker='tdsh', api_url=URL, magicbyte='140') tasks.refill_addresses_queue()
def setUp(self): self.currency = Currency.objects.create(label='Bitcoin regtest', ticker='tbtc', api_url=URL, magicbyte='111,196') tasks.refill_addresses_queue()