-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
121 lines (112 loc) · 3.48 KB
/
constants.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Delay simulated by mock functions.
from Models.User import User
SIMULATED_NETWORK_DELAY: float = 0.5
# ANSI escape codes.
# **************************
# Failed to push notif.
# 0-Simple text-styling, 37-white color, 41m-red bg.
ANSI_FAILED_NOTIF = '\033[0;37;41m'
ANSI_FAILED_NOTIF = ''
# Notif pushed successfully.
# Simple text-style, black color, green-bg.
ANSI_SUCCESS_NOTIF = '\033[0;30;42m'
ANSI_SUCCESS_NOTIF = ''
# End ANSI leak (Transparent bg)
ANSI_END = '\033[0;30;49m'
ANSI_END = ''
# **************************
# Dummy user dict for testing including edge cases.
DUMMY_USER_DICT = {
"valid_user_email": {
'in': User(
name='Dibyasom Puhan',
email='[email protected]',
phone='+919668766409',
url="https://www.toptiersecurity.com",
type='email'
),
'out': "EMAIL sent to [email protected]. Data: {'name': 'Dibyasom Puhan', 'email': '[email protected]', 'phone': '+919668766409', 'url': 'https://www.toptiersecurity.com', 'type': 'email'}"
},
"valid_user_sms": {
'in': User(
name='Dibyasom Puhan',
email='[email protected]',
phone='+919668766409',
url="https://www.toptiersecurity.com",
type='sms'
),
'out': "SMS sent to +919668766409. Data: {'name': 'Dibyasom Puhan', 'email': '[email protected]', 'phone': '+919668766409', 'url': 'https://www.toptiersecurity.com', 'type': 'sms'}"
},
"no_email": {
'in': User(
name='Dibyasom Puhan',
email=None,
phone='+919668766409',
url="https://www.toptiersecurity.com",
type='email'
),
'out': "EMAIL notifier *FAILED* [Invalid NAME or EMAIL] @ {'name': 'Dibyasom Puhan', 'email': None, 'phone': '+919668766409', 'url': None, 'type': 'email'}",
},
"no_name": User(
name=None,
email='[email protected]',
phone='+919668766409',
url=None,
type='email'
),
"no_type": User(
name='Dibyasom Puhan',
email='[email protected]',
phone='+919668766409',
url=None,
type=None
),
"none_but_essential_emailnotif": {
'in': User(
name='Dibyasom Puhan',
email='[email protected]',
phone=None,
url=None,
type='email'
),
'out': "EMAIL sent to [email protected]. Data: {'name': 'Dibyasom Puhan', 'email': '[email protected]', 'phone': None, 'url': None, 'type': 'email'}"
},
}
# ****************************************
DUMMY_USER_JSON_ARRAY = [
{
"name": "Brent Valdez",
"email": "[email protected]",
"phone": "139.386.6589",
"url": "https://ayers-perry.com/",
"type": "email"
},
{
"name": "Jonathan Green",
"email": None,
"phone": "(245)765-5361x8165",
"url": None,
"type": "email"
},
{
"name": "Barbara Donovan",
"email": "[email protected]",
"phone": "347-725-8534",
"url": None,
"type": "post"
},
{
"name": "Barbara Donovan",
"email": "[email protected]",
"phone": "347-725-8534",
"url": "https://www.url.com",
"type": "post"
},
{
"name": "Stephanie Martin",
"email": "[email protected]",
"phone": "001-621-651-0995x703",
"url": "https://www.nunez.com/",
"type": "sms"
},
]