-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add api test and use pip to install requirements
- Loading branch information
1 parent
d1d5a16
commit 25eec5b
Showing
5 changed files
with
31 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pytest~=3.10.0 | ||
selenium~=3.14.1 | ||
pytest-parallel | ||
requests~=2.20.0 |
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,19 @@ | ||
import pytest | ||
from requests import get | ||
from qs_page import QsPage | ||
|
||
|
||
@pytest.fixture(scope="module", autouse=True) | ||
def setup(driver): | ||
global qsPage | ||
qsPage = QsPage(driver) | ||
|
||
def test_qualityshepherd_site_returns_status_200(driver): | ||
res = get(qsPage.get_base_url()) | ||
|
||
assert res.status_code == 200 | ||
|
||
def test_non_existant_page_returns_404(driver): | ||
res = get(qsPage.get_base_url() + '/this_page_no_exits.php') | ||
|
||
assert res.status_code == 404 |