forked from sendgrid/sendgrid-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_config.py
More file actions
39 lines (36 loc) · 1.1 KB
/
Copy pathtest_config.py
File metadata and controls
39 lines (36 loc) · 1.1 KB
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
from sendgrid.helpers.inbound.config import Config
try:
import unittest2 as unittest
except ImportError:
import unittest
class UnitTests(unittest.TestCase):
def setUp(self):
self.config = Config()
def test_initialization(self):
endpoint = '/inbound'
port = 5000
debug_mode = True
keys = ['from',
'attachments',
'headers',
'text',
'envelope',
'to',
'html',
'sender_ip',
'attachment-info',
'subject',
'dkim',
'SPF',
'charsets',
'content-ids',
'spam_report',
'spam_score',
'email']
host = 'http://127.0.0.1:5000/inbound'
self.assertTrue(debug_mode, self.config.debug_mode)
self.assertTrue(endpoint, self.config.endpoint)
self.assertTrue(host, self.config.host)
self.assertTrue(port, self.config.port)
for key in keys:
self.assertTrue(key in self.config.keys)