Skip to content

Commit

Permalink
Revert "Fix 3.7 tests"
Browse files Browse the repository at this point in the history
This reverts commit 99110e9.
  • Loading branch information
adamjmcgrath committed Nov 22, 2023
1 parent 99110e9 commit d1a5201
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
6 changes: 1 addition & 5 deletions auth0/test_async/test_async_auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
20 changes: 3 additions & 17 deletions auth0/test_async/test_async_token_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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(
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 1 addition & 5 deletions auth0/test_async/test_asyncify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d1a5201

Please sign in to comment.