Skip to content

Commit 7cf38ca

Browse files
author
Matt Bernier
authored
Merge pull request sendgrid#480 from navinpai/license_test
Test to check year in LICENSE.txt
2 parents 0a57323 + 500f029 commit 7cf38ca

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/test_sendgrid.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import subprocess
1010
import sys
1111
import time
12+
import datetime
1213

1314
host = "http://localhost:4010"
1415

@@ -2368,6 +2369,12 @@ def test_whitelabel_links__link_id__subuser_post(self):
23682369
request_body=data, request_headers=headers)
23692370
self.assertEqual(response.status_code, 200)
23702371

2372+
def test_license_year(self):
2373+
LICENSE_FILE = 'LICENSE.txt'
2374+
with open(LICENSE_FILE, 'r') as f:
2375+
copyright_line = f.readline().rstrip()
2376+
self.assertEqual('Copyright (c) 2012-%s SendGrid, Inc.' % datetime.datetime.now().year, copyright_line)
2377+
23712378
@classmethod
23722379
def tearDownClass(cls):
23732380
cls.p.kill()

0 commit comments

Comments
 (0)