コード例 #1
0
    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)
コード例 #2
0
ファイル: tests.py プロジェクト: Mrkebubun/django-cc
    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)
コード例 #3
0
ファイル: models.py プロジェクト: IOTeam42/BitJobs
 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)
コード例 #4
0
 def setUp(self):
     self.currency = Currency.objects.create(label='Dash regtest',
                                             ticker='tdsh',
                                             api_url=URL,
                                             magicbyte='140')
     tasks.refill_addresses_queue()
コード例 #5
0
 def setUp(self):
     self.currency = Currency.objects.create(label='Dash regtest', ticker='tdsh', api_url=URL, magicbyte='140')
     tasks.refill_addresses_queue()
コード例 #6
0
 def setUp(self):
     self.currency = Currency.objects.create(label='Bitcoin regtest',
                                             ticker='tbtc',
                                             api_url=URL,
                                             magicbyte='111,196')
     tasks.refill_addresses_queue()
コード例 #7
0
 def setUp(self):
     self.currency = Currency.objects.create(label='Bitcoin regtest', ticker='tbtc', api_url=URL, magicbyte='111,196')
     tasks.refill_addresses_queue()