コード例 #1
0
def create_layers(context, num_layers):
    layers = []

    for i in range(num_layers):
        # dev_mode is True because otherwise the layer's ip is set to the
        # public ip of the node
        ob_ctx = OpenBazaarContext.create_default_instance()
        ob_ctx.dev_mode = True
        ob_ctx.server_ip = ip_address(i)
        ob_ctx.server_port = port
        db_path = get_db_path(i)
        setup_db(db_path, ob_ctx.disable_sqlite_crypt)
        layers.append(CryptoTransportLayer(ob_ctx, Obdb(db_path)))
    context.layers = layers
コード例 #2
0
def create_layers(context, num_layers):
    layers = []

    for i in range(num_layers):
        # dev_mode is True because otherwise the layer's ip is set to the
        # public ip of the node
        ob_ctx = OpenBazaarContext.create_default_instance()
        ob_ctx.dev_mode = True
        ob_ctx.server_ip = ip_address(i)
        ob_ctx.server_port = PORT
        db_path = get_db_path(i)
        setup_db(db_path, ob_ctx.disable_sqlite_crypt)
        layers.append(CryptoTransportLayer(ob_ctx, Obdb(db_path)))
    context.layers = layers
コード例 #3
0
def get_mock_open_bazaar_context():
    return OpenBazaarContext.create_default_instance()
コード例 #4
0
def get_mock_open_bazaar_context():
    return OpenBazaarContext.create_default_instance()
コード例 #5
0
ファイル: test_launcher.py プロジェクト: youprofit/OpenBazaar
 def setUp(self):
     self.default_ctx = OpenBazaarContext.create_default_instance()