| | 266 | def test_redir_using_url(self): |
|---|
| | 267 | for url in script_names: |
|---|
| | 268 | prefix = self.script_name = url |
|---|
| | 269 | |
|---|
| | 270 | # Test the absolute path to the parent (leading slash) |
|---|
| | 271 | self.getPage('/redirect_via_url?path=./') |
|---|
| | 272 | self.assertStatus(('302 Found', '303 See Other')) |
|---|
| | 273 | self.assertHeader('Location', '%s/' % self.base()) |
|---|
| | 274 | |
|---|
| | 275 | # Test the relative path to the parent (no leading slash) |
|---|
| | 276 | self.getPage('/redirect_via_url?path=./') |
|---|
| | 277 | self.assertStatus(('302 Found', '303 See Other')) |
|---|
| | 278 | self.assertHeader('Location', '%s/' % self.base()) |
|---|
| | 279 | |
|---|
| | 280 | # Test the absolute path to the parent (leading slash) |
|---|
| | 281 | self.getPage('/redirect_via_url/?path=./') |
|---|
| | 282 | self.assertStatus(('302 Found', '303 See Other')) |
|---|
| | 283 | self.assertHeader('Location', '%s/' % self.base()) |
|---|
| | 284 | |
|---|
| | 285 | # Test the relative path to the parent (no leading slash) |
|---|
| | 286 | self.getPage('/redirect_via_url/?path=./') |
|---|
| | 287 | self.assertStatus(('302 Found', '303 See Other')) |
|---|
| | 288 | self.assertHeader('Location', '%s/' % self.base()) |
|---|
| | 289 | |
|---|