Skip to content

Commit

Permalink
Merge pull request #480 from navinpai/license_test
Browse files Browse the repository at this point in the history
Test to check year in LICENSE.txt
  • Loading branch information
Matt Bernier authored Nov 1, 2017
2 parents 0a57323 + 500f029 commit 7cf38ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_sendgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import subprocess
import sys
import time
import datetime

host = "http://localhost:4010"

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

def test_license_year(self):
LICENSE_FILE = 'LICENSE.txt'
with open(LICENSE_FILE, 'r') as f:
copyright_line = f.readline().rstrip()
self.assertEqual('Copyright (c) 2012-%s SendGrid, Inc.' % datetime.datetime.now().year, copyright_line)

@classmethod
def tearDownClass(cls):
cls.p.kill()
Expand Down

0 comments on commit 7cf38ca

Please sign in to comment.