From 97d46d063245e5005f82142f64d0bb2a23858014 Mon Sep 17 00:00:00 2001 From: Jonathan Math Date: Wed, 17 Jun 2020 05:33:59 -0400 Subject: [PATCH] 2to3 test files --- apps/recommendations/tests.py | 2 +- vendor/paypal/standard/pdt/tests/__init__.py | 2 +- vendor/paypal/standard/pdt/tests/test_pdt.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/recommendations/tests.py b/apps/recommendations/tests.py index 2247054b3..c7c4668e1 100644 --- a/apps/recommendations/tests.py +++ b/apps/recommendations/tests.py @@ -12,7 +12,7 @@ class SimpleTest(TestCase): """ Tests that 1 + 1 always equals 2. """ - self.failUnlessEqual(1 + 1, 2) + self.assertEqual(1 + 1, 2) __test__ = {"doctest": """ Another way to test that 1 + 1 is equal to 2. diff --git a/vendor/paypal/standard/pdt/tests/__init__.py b/vendor/paypal/standard/pdt/tests/__init__.py index 4b59eb29e..0118a6234 100755 --- a/vendor/paypal/standard/pdt/tests/__init__.py +++ b/vendor/paypal/standard/pdt/tests/__init__.py @@ -1 +1 @@ -from test_pdt import * \ No newline at end of file +from .test_pdt import * \ No newline at end of file diff --git a/vendor/paypal/standard/pdt/tests/test_pdt.py b/vendor/paypal/standard/pdt/tests/test_pdt.py index 226365641..c99cbac9c 100755 --- a/vendor/paypal/standard/pdt/tests/test_pdt.py +++ b/vendor/paypal/standard/pdt/tests/test_pdt.py @@ -20,11 +20,11 @@ class DummyPayPalPDT(object): self.response = '' def update_with_get_params(self, get_params): - if get_params.has_key('tx'): + if 'tx' in get_params: self.context_dict['txn_id'] = get_params.get('tx') - if get_params.has_key('amt'): + if 'amt' in get_params: self.context_dict['mc_gross'] = get_params.get('amt') - if get_params.has_key('cm'): + if 'cm' in get_params: self.context_dict['custom'] = get_params.get('cm') def _postback(self, test=True):