def test_list(self): ctx = app.test_request_context() ctx.push() r = app.test_client().get(url_for('root')) self.assertEqual( r.status_code, 200 )
def setUpModule(): init_db() ctx = app.test_request_context() ctx.push() wallet1 = Wallet( 'box1', 'admin1', '123', 'localhost', 19001, False, True, ) wallet2 = Wallet( 'box2', 'admin2', '123', 'localhost', 19011, False, True, ) session.add(wallet1) session.add(wallet2) session.commit() # DONTFIXME encryption should be done through the webapp # Actually, no, this can't be done as it makes the daemon stop.. # Unless we let this code restart it... conn = get_connection(wallet2) info = conn.getinfo() if not hasattr(info, 'unlocked_until'): conn.encryptwallet(pp) else: # Unlock and refill the keypool conn.walletpassphrase(pp, 1) conn.keypoolrefill()
def setUp(self): self.client = app.test_client() ctx = app.test_request_context() ctx.push()
def setUpModule(): init_db() ctx = app.test_request_context() ctx.push()
def test_list(self): ctx = app.test_request_context() ctx.push() r = app.test_client().get(url_for('root')) self.assertEqual(r.status_code, 200)