-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
37 lines (29 loc) · 1.04 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
from dip import create_app
from dip.extensions import db
def test_login():
app=create_app()
client=app.test_client()
response = client.post('/login', data=dict(username='admin',password='admin'))
assert response.status_code == 302
def test_home_page():
app=create_app()
client=app.test_client()
response=client.get('/')
assert response.status_code == 200
def test_wiki():
app=create_app()
client=app.test_client()
response = client.post('/login', data=dict(username='admin',password='admin'))
response=client.get('/wiki')
assert response.status_code == 200
def test_new_job_title_gui():
app=create_app()
client=app.test_client()
response = client.post('/login', data=dict(username='admin',password='admin'))
response = client.post('/admin/dashboard/job-titles', data=dict(job_title='test'))
assert response.status_code == 302
def test_logout():
app=create_app()
client=app.test_client()
response=client.get('/logout')
assert response.status_code == 302