Fixing test to take python3 into account. (#460)
* Fixing test to take python3 into account.
This commit is contained in:
parent
1ac1a44e83
commit
d99681904e
@ -5,30 +5,29 @@ 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': [
|
{
|
||||||
{
|
'short': True,
|
||||||
'short': True,
|
'value': 'joe@example.com',
|
||||||
'value': 'joe@example.com',
|
'title': 'Owner'
|
||||||
'title': 'Owner'
|
},
|
||||||
},
|
{
|
||||||
{
|
'short': True,
|
||||||
'short': True,
|
'value': u'Wednesday, January 1, 2020',
|
||||||
'value': u'Wednesday, January 1, 2020',
|
'title': 'Expires'
|
||||||
'title': 'Expires'
|
}, {
|
||||||
}, {
|
'short': True,
|
||||||
'short': True,
|
'value': 0,
|
||||||
'value': 0,
|
'title': 'Endpoints Detected'
|
||||||
'title': 'Endpoints Detected'
|
}
|
||||||
}
|
],
|
||||||
],
|
'title_link': 'https://lemur.example.com/#/certificates/{name}'.format(name=certificate.name),
|
||||||
'title_link': 'https://lemur.example.com/#/certificates/certificate0',
|
'mrkdwn_in': ['text'],
|
||||||
'mrkdwn_in': ['text'],
|
'text': '',
|
||||||
'text': '',
|
'fallback': ''
|
||||||
'fallback': ''
|
}
|
||||||
}
|
|
||||||
]
|
assert attachment == create_expiration_attachments(data)[0]
|
||||||
assert attachments == create_expiration_attachments(data)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user