import pytest
from django.core.handlers.base import BaseHandler
from freezegun import freeze_time

from ..jwt import JWT_REFRESH_TOKEN_COOKIE_NAME, create_refresh_token


@pytest.mark.parametrize("expire", [True, False])
@freeze_time("2020-03-18 12:00:00")
def test_jwt_refresh_token_middleware(expire, rf, customer_user, settings):
    settings.JWT_EXPIRE = expire
    refresh_token = create_refresh_token(customer_user)
    settings.MIDDLEWARE = [
        "saleor.core.middleware.jwt_refresh_token_middleware",
    ]
    request = rf.request()
    request.refresh_token = refresh_token
    handler = BaseHandler()
    handler.load_middleware()
    response = handler.get_response(request)
    cookie = response.cookies.get(JWT_REFRESH_TOKEN_COOKIE_NAME)
    assert cookie.value == refresh_token

@@ -1,18 +1,4 @@
-import pytest%0A
 from
@@ -154,58 +154,8 @@
 n%0A%0A%0A
-@pytest.mark.parametrize(%22expire%22, %5BTrue, False%5D)%0A
 @fre
@@ -228,16 +228,8 @@
 are(
-expire, 
 rf, 
@@ -258,41 +258,8 @@
 s):%0A
-    settings.JWT_EXPIRE = expire%0A
     

Remove unneeded test