diff --git a/auth0/test_async/test_async_auth0.py b/auth0/test_async/test_async_auth0.py index 0089f99d..753666b5 100644 --- a/auth0/test_async/test_async_auth0.py +++ b/auth0/test_async/test_async_auth0.py @@ -22,11 +22,7 @@ def callback(url, **kwargs): return callback, mock -@unittest.skipIf( - not hasattr(unittest, "IsolatedAsyncioTestCase"), - "python 3.7 doesn't have IsolatedAsyncioTestCase", -) -class TestAuth0(getattr(unittest, "IsolatedAsyncioTestCase", object)): +class TestAuth0(unittest.IsolatedAsyncioTestCase): @pytest.mark.asyncio @aioresponses() async def test_get(self, mocked): diff --git a/auth0/test_async/test_async_token_verifier.py b/auth0/test_async/test_async_token_verifier.py index f1494c8e..7559c693 100644 --- a/auth0/test_async/test_async_token_verifier.py +++ b/auth0/test_async/test_async_token_verifier.py @@ -55,13 +55,7 @@ def get_pem_bytes(rsa_public_key): ) -@unittest.skipIf( - not hasattr(unittest, "IsolatedAsyncioTestCase"), - "python 3.7 doesn't have IsolatedAsyncioTestCase", -) -class TestAsyncAsymmetricSignatureVerifier( - getattr(unittest, "IsolatedAsyncioTestCase", object) -): +class TestAsyncAsymmetricSignatureVerifier(unittest.IsolatedAsyncioTestCase): @pytest.mark.asyncio @aioresponses() async def test_async_asymmetric_verifier_fetches_key(self, mocked): @@ -75,11 +69,7 @@ async def test_async_asymmetric_verifier_fetches_key(self, mocked): self.assertEqual(get_pem_bytes(key), RSA_PUB_KEY_1_PEM) -@unittest.skipIf( - not hasattr(unittest, "IsolatedAsyncioTestCase"), - "python 3.7 doesn't have IsolatedAsyncioTestCase", -) -class TestAsyncJwksFetcher(getattr(unittest, "IsolatedAsyncioTestCase", object)): +class TestAsyncJwksFetcher(unittest.IsolatedAsyncioTestCase): @pytest.mark.asyncio @aioresponses() @unittest.mock.patch( @@ -235,11 +225,7 @@ async def test_async_fails_to_fetch_jwks_json_after_retrying_twice(self, mocked) self.assertEqual(mock.call_count, 2) -@unittest.skipIf( - not hasattr(unittest, "IsolatedAsyncioTestCase"), - "python 3.7 doesn't have IsolatedAsyncioTestCase", -) -class TestAsyncTokenVerifier(getattr(unittest, "IsolatedAsyncioTestCase", object)): +class TestAsyncTokenVerifier(unittest.IsolatedAsyncioTestCase): @pytest.mark.asyncio @aioresponses() async def test_RS256_token_signature_passes(self, mocked): diff --git a/auth0/test_async/test_asyncify.py b/auth0/test_async/test_asyncify.py index 6c0175d0..acc3f54d 100644 --- a/auth0/test_async/test_asyncify.py +++ b/auth0/test_async/test_asyncify.py @@ -54,11 +54,7 @@ def callback(url, **kwargs): return callback, mock -@unittest.skipIf( - not hasattr(unittest, "IsolatedAsyncioTestCase"), - "python 3.7 doesn't have IsolatedAsyncioTestCase", -) -class TestAsyncify(getattr(unittest, "IsolatedAsyncioTestCase", object)): +class TestAsyncify(unittest.IsolatedAsyncioTestCase): @pytest.mark.asyncio @aioresponses() async def test_get(self, mocked):