We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 594131e commit eb3eb29Copy full SHA for eb3eb29
test/__init__.py
@@ -1,4 +1,5 @@
1
import unittest, json, decimal
2
+import datetime
3
from smtpapi import SMTPAPIHeader
4
5
class TestSMTPAPI(unittest.TestCase):
@@ -71,6 +72,15 @@ def test_drop_empty(self):
71
72
header.add_filter('testFilter', 'filter', 'filterValue')
73
self.assertEqual(self.dropsHeader, json.loads(header.json_string()))
74
75
+ def test_license_year(self):
76
+ LICENSE_FILE = 'LICENSE.txt'
77
+ copyright_line = ''
78
+ with open(LICENSE_FILE, 'r') as f:
79
+ for line in f:
80
+ if line.startswith('Copyright'):
81
+ copyright_line = line.strip()
82
+ break
83
+ self.assertEqual('Copyright (c) 2013-%s SendGrid, Inc.' % datetime.datetime.now().year, copyright_line)
84
85
if __name__ == '__main__':
86
unittest.main()
0 commit comments