-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest.py
58 lines (35 loc) · 1.29 KB
/
test.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from app import app
#running a test
def test1():
"""
This function test that the flask application has a
correct response code when the application goes live
"""
response = app.test_client().get("/")
assert response.status_code == 200
def test2():
"""A dummy docstring"""
response = app.test_client().get("/register")
assert response.status_code == 200
def test3():
"""Testing register page"""
response = app.test_client().get("/register")
assert b"Email" in response.data
assert b"Username" in response.data
assert b"Password" in response.data
assert b"Confirm password" in response.data
assert b"Register!" in response.data
def test4():
"""Testing Log In page"""
response = app.test_client().get("/login")
assert b"Email" in response.data
assert b"Password" in response.data
def test5():
"""Testing About us section """
response = app.test_client().get("/info")
assert b"Welcome to Team 1" in response.data
assert b"Copyright 2022 CUNY TTP - Winter 22 Bootcamp. All Rights Reserved." in response.data
def test6():
"""Testing Home section """
response = app.test_client().get("/")
assert b"Movies Review Blog" in response.data