Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Aug 18, 2022
1 parent 98effe6 commit 6b5a8f6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/sanic/test_sanic.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ def test_client(app):
return SanicTestClient(app)


@pytest.skipif(not sanic.__version__.startswith("20."), "requires sanic 20")
def test_instantiating_sanic_20(app):
dockerflow = Dockerflow()
assert "dockerflow.heartbeat" not in app.router.routes_names
dockerflow.init_app(app)
assert "dockerflow.heartbeat" in app.router.routes_names


@pytest.skipif(sanic.__version__.startswith("20."), "requires sanic 21 or later")
def test_instantiating(app):
Dockerflow()
assert ("__heartbeat__",) not in app.router.routes_all
Dockerflow(app)
assert ("__heartbeat__",) in app.router.routes_all


def test_instantiating(app):
Dockerflow()
if sanic.__version__.startswith("20."):
Expand Down

0 comments on commit 6b5a8f6

Please sign in to comment.