Ejemplo n.º 1
0
    def setUp(self):
        TestSputnik.setUp(self)

        self.accountant = accountant.CashierExport(FakeComponent("accountant"))
        self.bitcoinrpc = {"BTC": FakeBitcoin()}
        self.compropago = FakeComponent()
        self.bitgo = FakeBitgo()
        self.sendmail = FakeSendmail("*****@*****.**")
        keyfile = mkstemp(prefix="bitgo_key")[1]
        with open(keyfile, "w") as f:
            json.dump({"passphrase": "NULL"}, f)

        self.cashier = cashier.Cashier(
            self.session,
            self.accountant,
            self.bitcoinrpc,
            self.compropago,
            cold_wallet_period=None,
            sendmail=self.sendmail,
            template_dir=pkg_resources.resource_filename("sputnik.templates", None),
            minimum_confirmations=6,
            bitgo=self.bitgo,
            bitgo_private_key_file=keyfile,
            alerts=FakeComponent("alerts"),
        )

        self.administrator_export = cashier.AdministratorExport(self.cashier)
        self.webserver_export = cashier.WebserverExport(self.cashier)
        self.accountant_export = cashier.AccountantExport(self.cashier)
        self.compropago_hook = cashier.CompropagoHook(self.cashier)
        self.bitcoin_notify = cashier.BitcoinNotify(self.cashier)
Ejemplo n.º 2
0
    def setUp(self):
        TestSputnik.setUp(self)

        self.accountant = accountant.CashierExport(FakeComponent("accountant"))
        self.bitcoinrpc = {'BTC': FakeBitcoin()}
        self.compropago = FakeComponent()
        self.bitgo = FakeBitgo()
        self.sendmail = FakeSendmail('*****@*****.**')
        keyfile = mkstemp(prefix="bitgo_key")[1]
        with open(keyfile, "w") as f:
            json.dump({'passphrase': 'NULL'}, f)

        self.cashier = cashier.Cashier(self.session, self.accountant,
                                       self.bitcoinrpc,
                                       self.compropago,
                                       cold_wallet_period=None,
                                       sendmail=self.sendmail,
                                       template_dir=pkg_resources.resource_filename("sputnik.templates", None),
                                       minimum_confirmations=6,
                                       bitgo=self.bitgo,
                                       bitgo_private_key_file=keyfile,
                                       alerts=FakeComponent("alerts"))

        self.administrator_export = cashier.AdministratorExport(self.cashier)
        self.webserver_export = cashier.WebserverExport(self.cashier)
        self.accountant_export = cashier.AccountantExport(self.cashier)
        self.compropago_hook = cashier.CompropagoHook(self.cashier)
        self.bitcoin_notify = cashier.BitcoinNotify(self.cashier)
Ejemplo n.º 3
0
    def setUp(self):
        TestSputnik.setUp(self)

        self.engine = engine2.Engine()
        self.fake_listener = FakeComponent("listener")
        self.engine.add_listener(self.fake_listener)
        self.order_counter = 0

        self.administrator_export = engine2.AdministratorExport(self.engine)
Ejemplo n.º 4
0
    def setUp(self):
        TestSputnik.setUp(self)

        self.engine = engine2.Engine()
        self.fake_listener = FakeComponent("listener")
        self.engine.add_listener(self.fake_listener)
        self.order_counter = 0

        self.administrator_export = engine2.AdministratorExport(self.engine)
Ejemplo n.º 5
0
 def setUp(self):
     TestSputnik.setUp(self)
     self.ledger = ledger.Ledger(self.session.bind.engine)
     self.export = ledger.AccountantExport(self.ledger)
     self.clock = task.Clock()