File tree 1 file changed +25
-23
lines changed
1 file changed +25
-23
lines changed Original file line number Diff line number Diff line change @@ -15,29 +15,31 @@ def setUp(self):
15
15
def test_initialization (self ):
16
16
endpoint = '/inbound'
17
17
port = 5000
18
- debug_mode = True
19
- keys = ['from' ,
20
- 'attachments' ,
21
- 'headers' ,
22
- 'text' ,
23
- 'envelope' ,
24
- 'to' ,
25
- 'html' ,
26
- 'sender_ip' ,
27
- 'attachment-info' ,
28
- 'subject' ,
29
- 'dkim' ,
30
- 'SPF' ,
31
- 'charsets' ,
32
- 'content-ids' ,
33
- 'spam_report' ,
34
- 'spam_score' ,
35
- 'email' ]
18
+ keys = [
19
+ 'from' ,
20
+ 'attachments' ,
21
+ 'headers' ,
22
+ 'text' ,
23
+ 'envelope' ,
24
+ 'to' ,
25
+ 'html' ,
26
+ 'sender_ip' ,
27
+ 'attachment-info' ,
28
+ 'subject' ,
29
+ 'dkim' ,
30
+ 'SPF' ,
31
+ 'charsets' ,
32
+ 'content-ids' ,
33
+ 'spam_report' ,
34
+ 'spam_score' ,
35
+ 'email' ,
36
+ ]
36
37
host = 'http://127.0.0.1:5000/inbound'
37
- self .assertTrue (debug_mode , self .config .debug_mode )
38
- self .assertTrue (endpoint , self .config .endpoint )
39
- self .assertTrue (host , self .config .host )
40
- self .assertTrue (port , self .config .port )
38
+
39
+ self .assertTrue (self .config .debug_mode )
40
+ self .assertEqual (self .config .endpoint , endpoint )
41
+ self .assertEqual (self .config .host , host )
42
+ self .assertEqual (self .config .port , port )
41
43
for key in keys :
42
44
self .assertTrue (key in self .config .keys )
43
45
@@ -48,7 +50,7 @@ def test_init_environment_should_set_env_from_dotenv(self):
48
50
f .write ('RANDOM_VARIABLE=RANDOM_VALUE' )
49
51
Config ()
50
52
os .remove (env_file_path )
51
- self .assertEqual ('RANDOM_VALUE' , os .environ ['RANDOM_VARIABLE' ])
53
+ self .assertEqual (os .environ ['RANDOM_VARIABLE' ], 'RANDOM_VALUE' )
52
54
53
55
def test_init_environment_should_not_set_env_if_format_is_invalid (self ):
54
56
config_file = sendgrid .helpers .inbound .config .__file__
You can’t perform that action at this time.
0 commit comments