def setUp(self): TestSputnik.setUp(self) from sputnik import cashier from sputnik import accountant self.accountant = accountant.CashierExport(FakeComponent("accountant")) self.bitcoinrpc = {'BTC': FakeBitcoin()} self.compropago = FakeComponent() self.bitgo = FakeBitgo() self.sendmail = FakeSendmail('*****@*****.**') from tempfile import mkstemp import json 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="../server/sputnik/admin_templates", 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)
def setUp(self): TestSputnik.setUp(self) from sputnik import cashier from sputnik import accountant self.accountant = accountant.CashierExport(FakeComponent("accountant")) self.bitcoinrpc = {'BTC': FakeBitcoin()} self.compropago = FakeComponent() self.bitgo = FakeBitgo() self.sendmail = FakeSendmail('*****@*****.**') from tempfile import mkstemp import json 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="../server/sputnik/admin_templates", 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)
def setUp(self): TestSputnik.setUp(self) from sputnik import engine2 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)
def setUp(self): TestSputnik.setUp(self) fees_init = """ fees add LiqRebate 100 -50 100 50 fees add NoFee 0 0 0 0 fees add HeavyFee 200 200 200 400 accounts set marketmaker fees LiqRebate accounts set randomtrader fees HeavyFee accounts set m2 fees NoFee contracts set BTC/MXN fees 50 contracts set NETS2015 fees 350 contracts set MXN deposit_bps_fee 200 contracts set MXN withdraw_bps_fee 100 contracts set MXN deposit_base_fee 50 contracts set MXN withdraw_base_fee 100 """ self.run_leo(fees_init)
def setUp(self): TestSputnik.setUp(self) self.create_account("test") self.user = self.get_user("test")
def setUp(self): TestSputnik.setUp(self) self.ledger = ledger.Ledger(self.session.bind.engine) self.export = ledger.AccountantExport(self.ledger) self.clock = task.Clock()