Exemple #1
0
def test_create_destination():
    try:
        res = Notifications().create_destination(name='test', arn='arn')
        print(res)
    except SellingApiException as e:
        print(e)
Exemple #2
0
def test_delete_subscription():
    res = Notifications().delete_notification_subscription(
        NotificationType.MFN_ORDER_STATUS_CHANGE, 'subscription_id')
    print(res)
Exemple #3
0
def test_add_subscription():
    res = Notifications().add_subscription(
        NotificationType.REPORT_PROCESSING_FINISHED)
    print(res)
Exemple #4
0
def test_create_subscription():
    res = Notifications().create_subscription(
        NotificationType.MFN_ORDER_STATUS_CHANGE, destination_id='dest_id')
    print(res)
def test_create_destination():
    res = Notifications().create_destination(
        name='test', arn='arn:aws:sqs:us-east-2:444455556666:queue1')
    assert res.payload.get("destinationId") == "TEST_CASE_200_DESTINATION_ID"
    assert res.payload.get("resource").get('sqs').get(
        'arn') == "arn:aws:sqs:us-east-2:444455556666:queue1"
def test_get_subscriptions():
    res = Notifications().get_subscription(
        NotificationType.REPORT_PROCESSING_FINISHED)
    assert res.payload.get('destinationId') == 'TEST_CASE_200_DESTINATION_ID'
    assert res.payload.get('subscriptionId') == 'TEST_CASE_200_SUBSCRIPTION_ID'
def test_delete_subscription():
    res = Notifications().delete_notification_subscription(
        NotificationType.MFN_ORDER_STATUS_CHANGE, 'subscription_id')
    assert res.errors is None
def test_create_subscription():
    res = Notifications().create_subscription(
        NotificationType.MFN_ORDER_STATUS_CHANGE, destination_id='dest_id')
    assert res.payload.get('destinationId') == 'TEST_CASE_200_DESTINATION_ID'
    assert res.payload.get('subscriptionId') == 'TEST_CASE_200_SUBSCRIPTION_ID'