From f48d86c17b16e9f0aadd12a185854fec22d0cbcf Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 16:25:44 -0700 Subject: [PATCH 01/18] add logging --- tests/payouts/payouts_post_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 0c02e95..4077c79 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -10,6 +10,9 @@ class PayoutsPostTest(TestHarness): def testCreatePayouts(self): response = createPayouts(self.client) + print('PayoutsPostTest') + print(response) + self.assertEqual(201, response.status_code) self.assertIsNotNone(response.result) From 008e599f57bf4e3b2fc88fb3a425db49a562e2b3 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 16:48:16 -0700 Subject: [PATCH 02/18] add logging --- tests/payouts/payouts_post_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 4077c79..cd34eb5 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -12,6 +12,7 @@ def testCreatePayouts(self): print('PayoutsPostTest') print(response) + sys.stdout.flush() self.assertEqual(201, response.status_code) self.assertIsNotNone(response.result) From 509810506d135ac8f7a9c4513c0ab69873afecdf Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 16:55:29 -0700 Subject: [PATCH 03/18] add logging --- tests/payouts/payouts_post_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index cd34eb5..346af76 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -2,6 +2,7 @@ import json import string import random +import sys from paypalpayoutssdk.payouts import PayoutsPostRequest from tests import TestHarness From a8200e9761adb263c5ac09f15bf659840fef497f Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:05:19 -0700 Subject: [PATCH 04/18] add logging --- tests/payouts/payouts_post_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 346af76..920fdeb 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -4,6 +4,7 @@ import random import sys from paypalpayoutssdk.payouts import PayoutsPostRequest +from __future__ import print_function from tests import TestHarness class PayoutsPostTest(TestHarness): From 9d2cbde83c2c8f0de0dc8c6d842dd2dba132635e Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:08:12 -0700 Subject: [PATCH 05/18] add logging --- tests/payouts/payouts_post_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 920fdeb..afa4cb7 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -1,10 +1,10 @@ +from __future__ import print_function import unittest import json import string import random import sys from paypalpayoutssdk.payouts import PayoutsPostRequest -from __future__ import print_function from tests import TestHarness class PayoutsPostTest(TestHarness): From 38fa33e47f861a2858d515105e6991c65ec173f7 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:11:38 -0700 Subject: [PATCH 06/18] add logging --- tests/payouts/payouts_post_test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index afa4cb7..0d7c206 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -1,4 +1,3 @@ -from __future__ import print_function import unittest import json import string @@ -6,14 +5,13 @@ import sys from paypalpayoutssdk.payouts import PayoutsPostRequest from tests import TestHarness - class PayoutsPostTest(TestHarness): def testCreatePayouts(self): response = createPayouts(self.client) - print('PayoutsPostTest') - print(response) + sys.stdout.write('PayoutsPostTest') + sys.stdout.write(response) sys.stdout.flush() self.assertEqual(201, response.status_code) From 14efdb217d7fb5bd4dda0f75b6a27814e6f11ec4 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:16:16 -0700 Subject: [PATCH 07/18] add logging --- tests/payouts/payouts_post_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 0d7c206..6375164 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -11,7 +11,7 @@ def testCreatePayouts(self): response = createPayouts(self.client) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response) + sys.stdout.write(response.read().decode('utf-8')) sys.stdout.flush() self.assertEqual(201, response.status_code) From 1a93e0a99842c00808df59ab8666bfcc52d9de0f Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:23:19 -0700 Subject: [PATCH 08/18] add logging --- tests/payouts/payouts_post_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 6375164..d0904c5 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -11,7 +11,8 @@ def testCreatePayouts(self): response = createPayouts(self.client) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response.read().decode('utf-8')) + sys.stdout.write(response.getheaders()) + sys.stdout.write(response.msg) sys.stdout.flush() self.assertEqual(201, response.status_code) From b2fdb07e1fcbbfa8443c2856d2cecc9781594d69 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:28:15 -0700 Subject: [PATCH 09/18] add logging --- tests/payouts/payouts_post_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index d0904c5..57b8ff9 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -11,7 +11,8 @@ def testCreatePayouts(self): response = createPayouts(self.client) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response.getheaders()) + sys.stdout.write(response.headers) + sys.stdout.write(response.headers.getheader('content-type')) sys.stdout.write(response.msg) sys.stdout.flush() From 3cefba2e87d1605b786eb5779f1458ed507da970 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:34:23 -0700 Subject: [PATCH 10/18] add logging --- tests/payouts/payouts_post_test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 57b8ff9..dd76ee3 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -12,7 +12,6 @@ def testCreatePayouts(self): sys.stdout.write('PayoutsPostTest') sys.stdout.write(response.headers) - sys.stdout.write(response.headers.getheader('content-type')) sys.stdout.write(response.msg) sys.stdout.flush() From d399c5bc721b728831c7fbfbadc67125ad17a04d Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:41:46 -0700 Subject: [PATCH 11/18] add logging --- tests/payouts/payouts_post_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index dd76ee3..b6cc8b7 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -12,7 +12,8 @@ def testCreatePayouts(self): sys.stdout.write('PayoutsPostTest') sys.stdout.write(response.headers) - sys.stdout.write(response.msg) + sys.stdout.write(response.status) + sys.stdout.write(response.body) sys.stdout.flush() self.assertEqual(201, response.status_code) From 0621ba91333c96f7faf55e04619ace272af53299 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:45:40 -0700 Subject: [PATCH 12/18] add logging --- tests/payouts/payouts_post_test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index b6cc8b7..66d979b 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -12,7 +12,6 @@ def testCreatePayouts(self): sys.stdout.write('PayoutsPostTest') sys.stdout.write(response.headers) - sys.stdout.write(response.status) sys.stdout.write(response.body) sys.stdout.flush() From f252e5e639e87cf028d1fbad9d0f0e17916e51f9 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:49:22 -0700 Subject: [PATCH 13/18] add logging --- tests/payouts/payouts_post_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 66d979b..20ac639 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -12,7 +12,7 @@ def testCreatePayouts(self): sys.stdout.write('PayoutsPostTest') sys.stdout.write(response.headers) - sys.stdout.write(response.body) + sys.stdout.write(response.content) sys.stdout.flush() self.assertEqual(201, response.status_code) From d769a594f1bba143ea2d96afbc7f4e0fbccd0262 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 17:55:56 -0700 Subject: [PATCH 14/18] add logging --- tests/payouts/payouts_get_test.py | 8 ++++++++ tests/payouts/payouts_item_cancel_test.py | 8 ++++++++ tests/payouts/payouts_item_get_test.py | 7 +++++++ tests/payouts/payouts_post_test.py | 4 +++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/payouts/payouts_get_test.py b/tests/payouts/payouts_get_test.py index bcf05b4..ae14628 100755 --- a/tests/payouts/payouts_get_test.py +++ b/tests/payouts/payouts_get_test.py @@ -8,6 +8,14 @@ class PayoutsGetTest(TestHarness): def testPayoutsGetTest(self): response = getPayouts(self.client) + + sys.stdout.write('PayoutsPostTest') + sys.stdout.write(response.headers) + sys.stdout.write(response.status_code) + sys.stdout.write(response.result) + sys.stdout.write(response.result.links) + sys.stdout.flush() + self.assertEqual(200, response.status_code) self.assertIsNotNone(response.result) diff --git a/tests/payouts/payouts_item_cancel_test.py b/tests/payouts/payouts_item_cancel_test.py index 80e6263..ee55e03 100755 --- a/tests/payouts/payouts_item_cancel_test.py +++ b/tests/payouts/payouts_item_cancel_test.py @@ -13,6 +13,14 @@ def testPayoutsItemCancelTest(self): request = PayoutsItemCancelRequest(response.result.payout_item_id) response = self.client.execute(request) + + sys.stdout.write('PayoutsPostTest') + sys.stdout.write(response.headers) + sys.stdout.write(response.status_code) + sys.stdout.write(response.result) + sys.stdout.write(response.result.links) + sys.stdout.flush() + self.assertEqual(200, response.status_code) self.assertIsNotNone(response.result) diff --git a/tests/payouts/payouts_item_get_test.py b/tests/payouts/payouts_item_get_test.py index e2b1fc7..a419356 100755 --- a/tests/payouts/payouts_item_get_test.py +++ b/tests/payouts/payouts_item_get_test.py @@ -9,6 +9,13 @@ class PayoutsItemGetTest(TestHarness): def testPayoutsItemGetTest(self): response = getPayoutItem(self.client) + sys.stdout.write('PayoutsPostTest') + sys.stdout.write(response.headers) + sys.stdout.write(response.status_code) + sys.stdout.write(response.result) + sys.stdout.write(response.result.links) + sys.stdout.flush() + self.assertEqual(200, response.status_code) self.assertIsNotNone(response.result) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 20ac639..2b09b33 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -12,7 +12,9 @@ def testCreatePayouts(self): sys.stdout.write('PayoutsPostTest') sys.stdout.write(response.headers) - sys.stdout.write(response.content) + sys.stdout.write(response.status_code) + sys.stdout.write(response.result) + sys.stdout.write(response.result.links) sys.stdout.flush() self.assertEqual(201, response.status_code) From e4365ae2e385473bfd1c76ff05ec480d886fea9c Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 18:06:34 -0700 Subject: [PATCH 15/18] add logging --- tests/payouts/payouts_get_test.py | 1 + tests/payouts/payouts_item_cancel_test.py | 1 + tests/payouts/payouts_item_get_test.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/payouts/payouts_get_test.py b/tests/payouts/payouts_get_test.py index ae14628..b641d13 100755 --- a/tests/payouts/payouts_get_test.py +++ b/tests/payouts/payouts_get_test.py @@ -1,5 +1,6 @@ import unittest import json +import sys from paypalpayoutssdk.payouts import PayoutsGetRequest from tests.test_harness import TestHarness from tests.payouts.payouts_post_test import createPayouts diff --git a/tests/payouts/payouts_item_cancel_test.py b/tests/payouts/payouts_item_cancel_test.py index ee55e03..c8613bb 100755 --- a/tests/payouts/payouts_item_cancel_test.py +++ b/tests/payouts/payouts_item_cancel_test.py @@ -1,6 +1,7 @@ import unittest import json import time +import sys from paypalpayoutssdk.payouts import PayoutsItemCancelRequest from tests.test_harness import TestHarness from tests.payouts.payouts_item_get_test import getPayoutItem diff --git a/tests/payouts/payouts_item_get_test.py b/tests/payouts/payouts_item_get_test.py index a419356..ab4cb23 100755 --- a/tests/payouts/payouts_item_get_test.py +++ b/tests/payouts/payouts_item_get_test.py @@ -1,5 +1,6 @@ import unittest import json +import sys from paypalpayoutssdk.payouts import PayoutsItemGetRequest from tests.test_harness import TestHarness from tests.payouts.payouts_get_test import getPayouts From b426d58af01aec61d6ae7b4036f56e0299b40b34 Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 18:15:30 -0700 Subject: [PATCH 16/18] add logging --- tests/payouts/payouts_get_test.py | 1 - tests/payouts/payouts_item_cancel_test.py | 1 - tests/payouts/payouts_item_get_test.py | 1 - tests/payouts/payouts_post_test.py | 1 - 4 files changed, 4 deletions(-) diff --git a/tests/payouts/payouts_get_test.py b/tests/payouts/payouts_get_test.py index b641d13..71d77cb 100755 --- a/tests/payouts/payouts_get_test.py +++ b/tests/payouts/payouts_get_test.py @@ -11,7 +11,6 @@ def testPayoutsGetTest(self): response = getPayouts(self.client) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response.headers) sys.stdout.write(response.status_code) sys.stdout.write(response.result) sys.stdout.write(response.result.links) diff --git a/tests/payouts/payouts_item_cancel_test.py b/tests/payouts/payouts_item_cancel_test.py index c8613bb..a90803f 100755 --- a/tests/payouts/payouts_item_cancel_test.py +++ b/tests/payouts/payouts_item_cancel_test.py @@ -16,7 +16,6 @@ def testPayoutsItemCancelTest(self): response = self.client.execute(request) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response.headers) sys.stdout.write(response.status_code) sys.stdout.write(response.result) sys.stdout.write(response.result.links) diff --git a/tests/payouts/payouts_item_get_test.py b/tests/payouts/payouts_item_get_test.py index ab4cb23..66d385c 100755 --- a/tests/payouts/payouts_item_get_test.py +++ b/tests/payouts/payouts_item_get_test.py @@ -11,7 +11,6 @@ def testPayoutsItemGetTest(self): response = getPayoutItem(self.client) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response.headers) sys.stdout.write(response.status_code) sys.stdout.write(response.result) sys.stdout.write(response.result.links) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 2b09b33..39c43e9 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -11,7 +11,6 @@ def testCreatePayouts(self): response = createPayouts(self.client) sys.stdout.write('PayoutsPostTest') - sys.stdout.write(response.headers) sys.stdout.write(response.status_code) sys.stdout.write(response.result) sys.stdout.write(response.result.links) From 141f98b4718c116dbd7473fbf923e55b0d98f1fb Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 18:16:03 -0700 Subject: [PATCH 17/18] add logging --- tests/payouts/payouts_get_test.py | 2 +- tests/payouts/payouts_item_cancel_test.py | 2 +- tests/payouts/payouts_item_get_test.py | 2 +- tests/payouts/payouts_post_test.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/payouts/payouts_get_test.py b/tests/payouts/payouts_get_test.py index 71d77cb..dc4599a 100755 --- a/tests/payouts/payouts_get_test.py +++ b/tests/payouts/payouts_get_test.py @@ -16,7 +16,7 @@ def testPayoutsGetTest(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(200, response.status_code) + self.assertEqual(2001, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.batch_header.payout_batch_id) diff --git a/tests/payouts/payouts_item_cancel_test.py b/tests/payouts/payouts_item_cancel_test.py index a90803f..004d986 100755 --- a/tests/payouts/payouts_item_cancel_test.py +++ b/tests/payouts/payouts_item_cancel_test.py @@ -21,7 +21,7 @@ def testPayoutsItemCancelTest(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(200, response.status_code) + self.assertEqual(2001, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.links) diff --git a/tests/payouts/payouts_item_get_test.py b/tests/payouts/payouts_item_get_test.py index 66d385c..d0a7c73 100755 --- a/tests/payouts/payouts_item_get_test.py +++ b/tests/payouts/payouts_item_get_test.py @@ -16,7 +16,7 @@ def testPayoutsItemGetTest(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(200, response.status_code) + self.assertEqual(2001, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.links) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 39c43e9..84a94f3 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -16,7 +16,7 @@ def testCreatePayouts(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(201, response.status_code) + self.assertEqual(2011, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.batch_header.payout_batch_id) From 5574989780cce47e84e46bb5ef780c31eb8b0bcf Mon Sep 17 00:00:00 2001 From: Cheng Chang Date: Fri, 30 Apr 2021 18:21:19 -0700 Subject: [PATCH 18/18] add logging --- tests/payouts/payouts_get_test.py | 2 +- tests/payouts/payouts_item_cancel_test.py | 2 +- tests/payouts/payouts_item_get_test.py | 2 +- tests/payouts/payouts_post_test.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/payouts/payouts_get_test.py b/tests/payouts/payouts_get_test.py index dc4599a..71d77cb 100755 --- a/tests/payouts/payouts_get_test.py +++ b/tests/payouts/payouts_get_test.py @@ -16,7 +16,7 @@ def testPayoutsGetTest(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(2001, response.status_code) + self.assertEqual(200, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.batch_header.payout_batch_id) diff --git a/tests/payouts/payouts_item_cancel_test.py b/tests/payouts/payouts_item_cancel_test.py index 004d986..a90803f 100755 --- a/tests/payouts/payouts_item_cancel_test.py +++ b/tests/payouts/payouts_item_cancel_test.py @@ -21,7 +21,7 @@ def testPayoutsItemCancelTest(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(2001, response.status_code) + self.assertEqual(200, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.links) diff --git a/tests/payouts/payouts_item_get_test.py b/tests/payouts/payouts_item_get_test.py index d0a7c73..66d385c 100755 --- a/tests/payouts/payouts_item_get_test.py +++ b/tests/payouts/payouts_item_get_test.py @@ -16,7 +16,7 @@ def testPayoutsItemGetTest(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(2001, response.status_code) + self.assertEqual(200, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.links) diff --git a/tests/payouts/payouts_post_test.py b/tests/payouts/payouts_post_test.py index 84a94f3..39c43e9 100755 --- a/tests/payouts/payouts_post_test.py +++ b/tests/payouts/payouts_post_test.py @@ -16,7 +16,7 @@ def testCreatePayouts(self): sys.stdout.write(response.result.links) sys.stdout.flush() - self.assertEqual(2011, response.status_code) + self.assertEqual(201, response.status_code) self.assertIsNotNone(response.result) self.assertIsNotNone(response.result.batch_header.payout_batch_id)