-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3822 from davehunt/redirect-endpoints
Add URL tests that follow redirects and allow these to be run from the pipeline
- Loading branch information
Showing
7 changed files
with
152 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""Test redirects from the global.conf file.""" | ||
from __future__ import absolute_import | ||
from operator import itemgetter | ||
|
||
import pytest | ||
|
||
from .base import assert_valid_url | ||
from .map_htaccess import URLS as HTA_URLS | ||
from .map_globalconf import URLS as GLOBAL_URLS | ||
from .map_external import URLS as EXTERNAL_URLS | ||
from .map_locales import URLS as LOCALE_URLS | ||
|
||
|
||
@pytest.mark.smoke | ||
@pytest.mark.headless | ||
@pytest.mark.nondestructive | ||
@pytest.mark.parametrize('url', GLOBAL_URLS, ids=itemgetter('url')) | ||
def test_global_conf_url(url, base_url): | ||
url['base_url'] = base_url | ||
assert_valid_url(**url) | ||
|
||
|
||
@pytest.mark.smoke | ||
@pytest.mark.headless | ||
@pytest.mark.nondestructive | ||
@pytest.mark.parametrize('url', HTA_URLS, ids=itemgetter('url')) | ||
def test_htaccess_url(url, base_url): | ||
url['base_url'] = base_url | ||
assert_valid_url(**url) | ||
|
||
|
||
@pytest.mark.smoke | ||
@pytest.mark.headless | ||
@pytest.mark.nondestructive | ||
@pytest.mark.parametrize('url', LOCALE_URLS) | ||
def test_locale_url(url, base_url): | ||
url['base_url'] = base_url | ||
assert_valid_url(**url) | ||
|
||
|
||
@pytest.mark.headless | ||
@pytest.mark.nondestructive | ||
@pytest.mark.parametrize('url', EXTERNAL_URLS, ids=itemgetter('url')) | ||
def test_external_url(url): | ||
assert_valid_url(**url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters