Skip to content

Commit

Permalink
Test: Add clean up in app fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjr0719 committed Jun 20, 2019
1 parent e006a73 commit fa1b111
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/conftest.py
@@ -1,10 +1,15 @@
import pytest
from sanic import Sanic
from sanic_openapi import swagger_blueprint

import sanic_openapi


@pytest.fixture()
def app():
app = Sanic('test')
app.blueprint(swagger_blueprint)
return app
app = Sanic("test")
app.blueprint(sanic_openapi.swagger_blueprint)
yield app

# Clean up
sanic_openapi.swagger.definitions = {}
sanic_openapi.swagger._spec = {}

0 comments on commit fa1b111

Please sign in to comment.