Remove unnecessary import in test_constants.py, which also fixes an error on win (#2180)

Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
This commit is contained in:
Zhiwei 2021-07-05 01:51:36 -07:00 committed by GitHub
parent 8df80e276b
commit 8b7ea27a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,4 @@
from crypt import methods from sanic import Sanic, text
from sanic import text
from sanic.constants import HTTP_METHODS, HTTPMethod from sanic.constants import HTTP_METHODS, HTTPMethod
@ -14,7 +12,7 @@ def test_string_compat():
assert HTTPMethod.GET.upper() == "GET" 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]) @app.route("/", methods=[HTTPMethod.GET, HTTPMethod.POST])
def handler(_): def handler(_):
return text("It works") return text("It works")