Skip to content

Commit

Permalink
Create Base module for Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Monal5031 committed May 15, 2018
1 parent 39285b6 commit 4d70e49
Show file tree
Hide file tree
Showing 21 changed files with 420 additions and 0 deletions.
Empty file added Tests/__init__.py
Empty file.
Empty file added Tests/administrator/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/administrator/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file.
42 changes: 42 additions & 0 deletions Tests/authentication/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/event/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/event/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/home/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/home/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/job/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/job/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/organization/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/organization/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/pom/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/pom/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/registration/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/registration/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/shift/__init__.py
Empty file.
42 changes: 42 additions & 0 deletions Tests/shift/test_working.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Third Party Imports
from selenium import webdriver

# Django imports
from django.contrib.staticfiles.testing import LiveServerTestCase


# Local Project Imports
from selenium.webdriver.common.keys import Keys


class DummyTesting(LiveServerTestCase):
"""
Dummy Test Class to check the tests are working correctly.
"""

@classmethod
def setUpClass(cls):

cls.driver = webdriver.Firefox()
cls.driver.implicitly_wait(5)
cls.driver.maximize_window()
super(DummyTesting, cls).setUpClass()

@classmethod
def tearDownClass(cls):
cls.driver.quit()
super(DummyTesting, cls).tearDownClass()

def test_working(self):
"""
Dummy Test function to check working of selenium
Delete this function after the first test for this
Class is added.
"""
self.driver.get("http://www.python.org")
self.assertIn('Python', self.driver.title)
element = self.driver.find_element_by_name('q')
element.clear()
element.send_keys('pycon')
element.send_keys(Keys.RETURN)
self.assertNotIn('No results found.', self.driver.page_source)
Empty file added Tests/volunteer/__init__.py
Empty file.
Loading

0 comments on commit 4d70e49

Please sign in to comment.