diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-25 21:37:59 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-25 21:37:59 +0100 |
commit | fac76c9e24f38bdc7509e4909e5eaa842c151488 (patch) | |
tree | 63797bb2a21edfac80b90b075107ba91d3168a8f | |
parent | 8a4cb3ebf3b620834cadd58a20ca59a403ad9b77 (diff) |
added selenium functional test
Diffstat (limited to '')
-rw-r--r-- | ctrack/core/tests/test_functional.py | 14 | ||||
-rw-r--r-- | requirements/local.txt | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/ctrack/core/tests/test_functional.py b/ctrack/core/tests/test_functional.py new file mode 100644 index 0000000..a802f22 --- /dev/null +++ b/ctrack/core/tests/test_functional.py @@ -0,0 +1,14 @@ +import pytest +from selenium import webdriver + + +@pytest.fixture +def browser(): + b = webdriver.Firefox() + yield b + b.quit() + + +def test_can_get_homepage(browser): + browser.get("http://localhost:8000") + assert "ctrack" in browser.title diff --git a/requirements/local.txt b/requirements/local.txt index fba9818..30d4a06 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -5,7 +5,8 @@ psycopg2-binary # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest # https://github.com/pytest-dev/pytest +pytest==3.4.2 # https://github.com/pytest-dev/pytest +selenium==3.141.0 # Code quality # ------------------------------------------------------------------------------ |