From b03f2a307dfdaafc1597035ef669b14da0d55f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 2 Apr 2018 13:40:14 +0200 Subject: Small refactor for `super` use --- test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index c229801..9ea9df4 100644 --- a/test.py +++ b/test.py @@ -27,7 +27,7 @@ class WebMockTestCase(unittest.TestCase): return type('Args', (object,), { "debug": debug, "quiet": quiet })() def setUp(self): - super(WebMockTestCase, self).setUp() + super().setUp() self.wm = requests_mock.Mocker() self.wm.start() @@ -55,12 +55,12 @@ class WebMockTestCase(unittest.TestCase): for patcher in self.patchers: patcher.stop() self.wm.stop() - super(WebMockTestCase, self).tearDown() + super().tearDown() @unittest.skipUnless("unit" in limits, "Unit skipped") class poloniexETest(unittest.TestCase): def setUp(self): - super(poloniexETest, self).setUp() + super().setUp() self.wm = requests_mock.Mocker() self.wm.start() @@ -68,7 +68,7 @@ class poloniexETest(unittest.TestCase): def tearDown(self): self.wm.stop() - super(poloniexETest, self).tearDown() + super().tearDown() def test__init(self): with mock.patch("market.ccxt.poloniexE.session") as session: @@ -609,7 +609,7 @@ class LockedVar(unittest.TestCase): @unittest.skipUnless("unit" in limits, "Unit skipped") class PortfolioTest(WebMockTestCase): def setUp(self): - super(PortfolioTest, self).setUp() + super().setUp() with open("test_samples/test_portfolio.json") as example: self.json_response = example.read() @@ -1154,7 +1154,7 @@ class BalanceTest(WebMockTestCase): @unittest.skipUnless("unit" in limits, "Unit skipped") class MarketTest(WebMockTestCase): def setUp(self): - super(MarketTest, self).setUp() + super().setUp() self.ccxt = mock.Mock(spec=market.ccxt.poloniexE) @@ -2056,7 +2056,7 @@ class TradeStoreTest(WebMockTestCase): @unittest.skipUnless("unit" in limits, "Unit skipped") class BalanceStoreTest(WebMockTestCase): def setUp(self): - super(BalanceStoreTest, self).setUp() + super().setUp() self.fetch_balance = { "ETC": { -- cgit v1.2.3