Fixing test to take python3 into account. (#460)

* Fixing test to take python3 into account.
This commit is contained in:
kevgliss 2016-10-31 17:02:08 -07:00 committed by GitHub
parent 1ac1a44e83
commit d99681904e
1 changed files with 26 additions and 27 deletions

View File

@ -5,9 +5,8 @@ def test_formatting(certificate):
from lemur.notifications.service import _get_message_data from lemur.notifications.service import _get_message_data
data = [_get_message_data(certificate)] data = [_get_message_data(certificate)]
attachments = [ attachment = {
{ 'title': certificate.name,
'title': 'certificate0',
'color': 'danger', 'color': 'danger',
'fields': [ 'fields': [
{ {
@ -25,10 +24,10 @@ def test_formatting(certificate):
'title': 'Endpoints Detected' 'title': 'Endpoints Detected'
} }
], ],
'title_link': 'https://lemur.example.com/#/certificates/certificate0', 'title_link': 'https://lemur.example.com/#/certificates/{name}'.format(name=certificate.name),
'mrkdwn_in': ['text'], 'mrkdwn_in': ['text'],
'text': '', 'text': '',
'fallback': '' 'fallback': ''
} }
]
assert attachments == create_expiration_attachments(data) assert attachment == create_expiration_attachments(data)[0]