-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_test.py
43 lines (36 loc) · 863 Bytes
/
main_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
from unittest.mock import Mock
import main
#test set for new trial
data = {
"email": "leigha@looker.com",
"name": "0064400000ssT5",
"weeks": '3',
"type" : 'Customer / Prospect'
}
#test set for existing trial
data = {
"email": "leigha@looker.com",
"name": "0064400000ssT5",
"weeks": 5,
"type" : 'Customer / Prospect'
}
#test set for internal without a name
data = {
"email": "leigha@looker.com",
"type" : "Personal Development Instance"
}
#test set for internal with a name
data = {
"email": "leigha@looker.com",
"name": "demoexpo",
"type": "Internal Shared Instance"
}
#test set for partner
data = {
"email": "leigha@looker.com",
"name": "leighaspartner",
"type":"Partner"
}
req = Mock(get_json=Mock(return_value=data), args=data)
# Call tested function
main.form_trigger(req)