This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
test_notifications.py
37 lines (28 loc) · 1.82 KB
/
test_notifications.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from unittest import TestCase
import pytest
import aftership
from aftership import const
class NotificationTestCase(TestCase):
@pytest.mark.vcr()
def test_list_notification(self):
response = aftership.notification.list_notifications(tracking_id='k5lh7dy7vvqeck71p5loe011')
@pytest.mark.vcr()
def test_aes_list_notification(self):
response = aftership.notification.list_notifications(tracking_id='k5lh7dy7vvqeck71p5loe011',
signature_type=const.SIGNATURE_AES_HMAC_SHA256)
@pytest.mark.vcr()
def test_add_notification(self):
response = aftership.notification.add_notification(tracking_id='k5lh7dy7vvqeck71p5loe011',
notification={'emails': ['[email protected]']})
def test_aes_add_notification(self):
response = aftership.notification.add_notification(tracking_id='k5lh7dy7vvqeck71p5loe011',
notification={"emails": ["[email protected]"]},
signature_type=const.SIGNATURE_AES_HMAC_SHA256)
@pytest.mark.vcr()
def test_remove_notification(self):
response = aftership.notification.remove_notification(tracking_id='k5lh7dy7vvqeck71p5loe011',
notification={"emails": ["[email protected]"]})
def test_aes_remove_notification(self):
response = aftership.notification.remove_notification(tracking_id='k5lh7dy7vvqeck71p5loe011',
notification={"emails": ["[email protected]"]},
signature_type=const.SIGNATURE_AES_HMAC_SHA256)