2
0
Fork 0

[tests] small redirect test

This commit is contained in:
Stefan Bühler 2010-10-13 14:45:15 +02:00
parent f635eb4163
commit 798c25e64c
1 changed files with 21 additions and 0 deletions

21
tests/t-redirect.py Normal file
View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from base import *
from requests import *
class TestForceHttps(CurlRequest):
config = """
redirect "https://%{request.host}%{enc:request.path}?%{request.query}";
"""
URL = "/?a_simple_query"
EXPECT_RESPONSE_CODE = 301
EXPECT_RESPONSE_HEADERS = [("Location", "https://forcehttps.redirect/?a_simple_query")]
class Test(GroupTest):
plain_config = """
setup { module_load "mod_redirect"; }
"""
group = [
TestForceHttps,
]