forked from Jackmacintyre3/bsc23_season
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_python.py
38 lines (29 loc) · 1.14 KB
/
test_python.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""These are the tests that are automatically kicked off by Selenium
"""
from selenium_python import verify_reach_homepage
import pytest, pydoc
'''
This is part of the pytest suite we have implemented for
our DevOps pipeline, it tests the expected results upon reaching the home page
We would expect one failure and two passes here.
'''
def pydoc_gen():
documentation = pydoc.writedoc("test_entry_pass")
print(documentation)
class TestClass:
"""Testing the pydoc module
"""
# we should pass
def test_entry_bad(value):
text = "No hello world here"
assert verify_reach_homepage("No hello world here") == "We are not getting to the homepage"
# we should get a failure back
def test_entry_fail(value):
text = "Hm"
assert verify_reach_homepage("Hm") == "We are not getting to the homepage"
# we should get a pass as we have given the expected test for reaching the home page
def test_entry_pass(value):
text = "Hello World!"
assert verify_reach_homepage(text) == "We can confirm we are reaching the homepage"
if __name__ == "__main__":
TestClass.test_entry_pass()