From 8b7ea27a48cdc1654724701d2df174d5b4d2cc70 Mon Sep 17 00:00:00 2001 From: Zhiwei Date: Mon, 5 Jul 2021 01:51:36 -0700 Subject: [PATCH] Remove unnecessary import in test_constants.py, which also fixes an error on win (#2180) Co-authored-by: Adam Hopkins --- tests/test_constants.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_constants.py b/tests/test_constants.py index 7ce6e4d7..2f1eb3d0 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -1,6 +1,4 @@ -from crypt import methods - -from sanic import text +from sanic import Sanic, text from sanic.constants import HTTP_METHODS, HTTPMethod @@ -14,7 +12,7 @@ def test_string_compat(): assert HTTPMethod.GET.upper() == "GET" -def test_use_in_routes(app): +def test_use_in_routes(app: Sanic): @app.route("/", methods=[HTTPMethod.GET, HTTPMethod.POST]) def handler(_): return text("It works")