コード例 #1
0
 def test_get_notification_invalid_code(self):
     handler = PagSeguroNotificationHandler(**self.data)
     with self.assertRaises(NotificationNotFoundException):
         response = handler.get_notification_response()
コード例 #2
0
 def test_get_checkout_without_code(self):
     handler = PagSeguroNotificationHandler(**self.data)
     with self.assertRaises(ApiErrorException):
         response = handler.get_notification_response()
コード例 #3
0
 def test_get_notification_response(self):
     handler = PagSeguroNotificationHandler(**self.data)
     response = handler.get_notification_response()
     self.assertEqual(response.status, u'Paga')
コード例 #4
0
 def test_create_without_code(self):
     self.data['code'] = None
     with self.assertRaises(ValueError):
         handler = PagSeguroNotificationHandler(**self.data)
コード例 #5
0
 def test_get_checkout_without_code(self):
     handler = PagSeguroNotificationHandler(**self.data)
     with self.assertRaises(ApiErrorException):
         response = handler.get_notification_response()
コード例 #6
0
 def test_get_notification_invalid_code(self):
     handler = PagSeguroNotificationHandler(**self.data)
     with self.assertRaises(NotificationNotFoundException):
         response = handler.get_notification_response()
コード例 #7
0
 def test_get_notification_response(self):
     handler = PagSeguroNotificationHandler(**self.data)
     response = handler.get_notification_response()
     self.assertEqual(response.status, u'Paga')