6
6
7
7
from modules .browser_object_tabbar import TabBar
8
8
9
+ PHISHING_URL = "http://www.itisatrap.org/firefox/its-a-trap.html"
10
+ MALWARE_URL = "http://www.itisatrap.org/firefox/its-an-attack.html"
11
+
9
12
10
13
@pytest .fixture ()
11
14
def add_prefs ():
@@ -35,10 +38,9 @@ def test_phishing_and_malware_warning_errors(driver: Firefox):
35
38
tabs = TabBar (driver )
36
39
37
40
# Test phishing warning page
38
- phishing_url = "http://www.itisatrap.org/firefox/its-a-trap.html"
39
- phishing_error_title = get_error_title (driver , phishing_url )
41
+ phishing_error_title = get_error_title (driver , PHISHING_URL )
40
42
assert phishing_error_title == "Deceptive site ahead" , (
41
- f"Expected error title 'Deceptive site ahead' not found at { phishing_url } . "
43
+ f"Expected error title 'Deceptive site ahead' not found at { PHISHING_URL } . "
42
44
f"Actual: { phishing_error_title } "
43
45
)
44
46
@@ -48,9 +50,8 @@ def test_phishing_and_malware_warning_errors(driver: Firefox):
48
50
driver .switch_to .window (driver .window_handles [1 ])
49
51
50
52
# Test malware warning page
51
- malware_url = "http://www.itisatrap.org/firefox/its-an-attack.html"
52
- malware_error_title = get_error_title (driver , malware_url )
53
+ malware_error_title = get_error_title (driver , MALWARE_URL )
53
54
assert malware_error_title == "Visiting this website may harm your computer" , (
54
- f"Expected error title 'Visiting this website may harm your computer' not found at { malware_url } . "
55
+ f"Expected error title 'Visiting this website may harm your computer' not found at { MALWARE_URL } . "
55
56
f"Actual: { malware_error_title } "
56
57
)
0 commit comments