mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 15:05:31 +08:00
17 lines
475 B
Python
17 lines
475 B
Python
import pytest
|
|
from flask import Flask
|
|
from engine import app
|
|
|
|
@pytest.fixture(scope='module')
|
|
def test_client():
|
|
# Flask provides a way to test your application by exposing the Werkzeug test Client
|
|
# and handling the context locals for you.
|
|
testing_client = app.test_client()
|
|
|
|
# Establish an application context before running the tests.
|
|
ctx = app.app_context()
|
|
ctx.push()
|
|
|
|
yield testing_client # this is where the testing happens!
|
|
|
|
ctx.pop() |