Пример #1
0
 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
     )
Пример #2
0
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()
Пример #3
0
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()
Пример #4
0
 def setUp(self):
     self.client = app.test_client()
     ctx = app.test_request_context()
     ctx.push()
Пример #5
0
 def setUp(self):
     self.client = app.test_client()
     ctx = app.test_request_context()
     ctx.push()
Пример #6
0
def setUpModule():
    init_db()
    ctx = app.test_request_context()
    ctx.push()
Пример #7
0
 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)
Пример #8
0
def setUpModule():
    init_db()
    ctx = app.test_request_context()
    ctx.push()