From ee21fccd52a029b8adaebf86fa5061abb5f2bcf4 Mon Sep 17 00:00:00 2001 From: JasonHomeWorkstationUbuntu Date: Thu, 15 Oct 2020 16:00:29 +1100 Subject: [PATCH] Chap1.1 Obey the Testing Goat! Do Nothing Until You Have a Test --- src/.gitignore | 4 ++++ src/functional_tests.py | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 src/.gitignore create mode 100644 src/functional_tests.py diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..2dd724d --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,4 @@ +db.sqlite3 +geckodriver.log +virtualenv +**__pycache__** \ No newline at end of file diff --git a/src/functional_tests.py b/src/functional_tests.py new file mode 100644 index 0000000..e21bfb4 --- /dev/null +++ b/src/functional_tests.py @@ -0,0 +1,7 @@ +from selenium import webdriver + +browser = webdriver.Firefox() +browser.get('http://localhost:8000') + +assert 'Django' in browser.title +