From 59347d71388f6b08e51a606c04de12c89c8b4327 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Fri, 20 Dec 2019 13:42:23 +0100 Subject: [PATCH] Updating tests --- VIPSWeb/test.py | 10 +++++----- requirements.txt | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/VIPSWeb/test.py b/VIPSWeb/test.py index 54628642..cc1c5a96 100644 --- a/VIPSWeb/test.py +++ b/VIPSWeb/test.py @@ -10,11 +10,11 @@ options.headless = True class SearchText(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox(options=options) - self.driver.implicitly_wait(15) - self.driver.get("http://localhost:8080") - - def test_links(self): - self.driver.find_element_by_link_text("VIPS").click() + self.driver.implicitly_wait(10) + self.driver.get("http://localhost:8000") + + def test_maintenance_mode(self): + assert "Site down for maintenance" in self.driver.page_source def tearDown(self): self.driver.quit() diff --git a/requirements.txt b/requirements.txt index 51f11c6d..0056849c 100755 --- a/requirements.txt +++ b/requirements.txt @@ -23,3 +23,5 @@ Pillow requests==2.6.0 django-tinymce==2.8.0 python-dateutil==1.5 +selenium +geckodriver -- GitLab