Fix for ETSI Catalog Manager does not support HTTPS for Test Notification Endpoint...
[modeling/etsicatalog.git] / catalog / packages / tests / test_vnf_pkg_subscription.py
index fd229ec..17de7cf 100644 (file)
@@ -20,6 +20,7 @@ import mock
 from django.test import TestCase
 from rest_framework import status
 from rest_framework.test import APIClient
+from requests.auth import HTTPBasicAuth
 
 import catalog.pub.utils.timeutil
 from catalog.packages import const
@@ -242,7 +243,11 @@ class TestNfPackageSubscription(TestCase):
             }
         }
         mock_requests_post.assert_called_with(vnf_subscription_data["callbackUri"], data=expect_notification,
-                                              headers={'Connection': 'close'})
+                                              headers={'Connection': 'close',
+                                                       'content-type': 'application/json',
+                                                       'accept': 'application/json'},
+                                              auth=HTTPBasicAuth("admin", "pwd1234"),
+                                              verify=False)
 
     def test_service_query_single_subscription_not_found(self):
         try:
@@ -313,4 +318,7 @@ class NotificationTest(TestCase):
             }
         }
         mock_requests_post.assert_called_with(expect_callbackuri, data=expect_notification,
-                                              headers={'Connection': 'close'})
+                                              headers={'Connection': 'close',
+                                                       'content-type': 'application/json',
+                                                       'accept': 'application/json'},
+                                              verify=False)