Skip to content

Commit f3c04b2

Browse files
committed
fix unittests to work with aiohttp 3.10+ (#326)
1 parent 40f208c commit f3c04b2

File tree

63 files changed

+131
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+131
-128
lines changed

kubernetes_asyncio/test/test_admissionregistration_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAdmissionregistrationApi(unittest.TestCase):
23-
"""AdmissionregistrationApi unit test stubs"""
22+
class TestAdmissionregistrationApi(unittest.IsolatedAsyncioTestCase):
2423

25-
def setUp(self):
24+
"""AdmissionregistrationApi unit test stubs"""
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.admissionregistration_api.AdmissionregistrationApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_admissionregistration_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAdmissionregistrationV1Api(unittest.TestCase):
22+
class TestAdmissionregistrationV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AdmissionregistrationV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.admissionregistration_v1_api.AdmissionregistrationV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_admissionregistration_v1alpha1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAdmissionregistrationV1alpha1Api(unittest.TestCase):
22+
class TestAdmissionregistrationV1alpha1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AdmissionregistrationV1alpha1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.admissionregistration_v1alpha1_api.AdmissionregistrationV1alpha1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_admissionregistration_v1beta1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAdmissionregistrationV1beta1Api(unittest.TestCase):
22+
class TestAdmissionregistrationV1beta1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AdmissionregistrationV1beta1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.admissionregistration_v1beta1_api.AdmissionregistrationV1beta1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apiextensions_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestApiextensionsApi(unittest.TestCase):
22+
class TestApiextensionsApi(unittest.IsolatedAsyncioTestCase):
2323
"""ApiextensionsApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apiextensions_api.ApiextensionsApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apiextensions_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestApiextensionsV1Api(unittest.TestCase):
22+
class TestApiextensionsV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""ApiextensionsV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apiextensions_v1_api.ApiextensionsV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apiregistration_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestApiregistrationApi(unittest.TestCase):
22+
class TestApiregistrationApi(unittest.IsolatedAsyncioTestCase):
2323
"""ApiregistrationApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apiregistration_api.ApiregistrationApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apiregistration_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestApiregistrationV1Api(unittest.TestCase):
22+
class TestApiregistrationV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""ApiregistrationV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apiregistration_v1_api.ApiregistrationV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apis_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestApisApi(unittest.TestCase):
22+
class TestApisApi(unittest.IsolatedAsyncioTestCase):
2323
"""ApisApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apis_api.ApisApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apps_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAppsApi(unittest.TestCase):
22+
class TestAppsApi(unittest.IsolatedAsyncioTestCase):
2323
"""AppsApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apps_api.AppsApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_apps_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAppsV1Api(unittest.TestCase):
22+
class TestAppsV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AppsV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.apps_v1_api.AppsV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_authentication_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAuthenticationApi(unittest.TestCase):
22+
class TestAuthenticationApi(unittest.IsolatedAsyncioTestCase):
2323
"""AuthenticationApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.authentication_api.AuthenticationApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_authentication_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAuthenticationV1Api(unittest.TestCase):
22+
class TestAuthenticationV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AuthenticationV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.authentication_v1_api.AuthenticationV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_authentication_v1alpha1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAuthenticationV1alpha1Api(unittest.TestCase):
22+
class TestAuthenticationV1alpha1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AuthenticationV1alpha1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.authentication_v1alpha1_api.AuthenticationV1alpha1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_authentication_v1beta1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAuthenticationV1beta1Api(unittest.TestCase):
22+
class TestAuthenticationV1beta1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AuthenticationV1beta1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.authentication_v1beta1_api.AuthenticationV1beta1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_authorization_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAuthorizationApi(unittest.TestCase):
22+
class TestAuthorizationApi(unittest.IsolatedAsyncioTestCase):
2323
"""AuthorizationApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.authorization_api.AuthorizationApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_authorization_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAuthorizationV1Api(unittest.TestCase):
22+
class TestAuthorizationV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AuthorizationV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.authorization_v1_api.AuthorizationV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_autoscaling_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAutoscalingApi(unittest.TestCase):
22+
class TestAutoscalingApi(unittest.IsolatedAsyncioTestCase):
2323
"""AutoscalingApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.autoscaling_api.AutoscalingApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_autoscaling_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAutoscalingV1Api(unittest.TestCase):
22+
class TestAutoscalingV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""AutoscalingV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.autoscaling_v1_api.AutoscalingV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_autoscaling_v2_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestAutoscalingV2Api(unittest.TestCase):
22+
class TestAutoscalingV2Api(unittest.IsolatedAsyncioTestCase):
2323
"""AutoscalingV2Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.autoscaling_v2_api.AutoscalingV2Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_batch_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestBatchApi(unittest.TestCase):
22+
class TestBatchApi(unittest.IsolatedAsyncioTestCase):
2323
"""BatchApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.batch_api.BatchApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_batch_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestBatchV1Api(unittest.TestCase):
22+
class TestBatchV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""BatchV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.batch_v1_api.BatchV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_certificates_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCertificatesApi(unittest.TestCase):
22+
class TestCertificatesApi(unittest.IsolatedAsyncioTestCase):
2323
"""CertificatesApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.certificates_api.CertificatesApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_certificates_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCertificatesV1Api(unittest.TestCase):
22+
class TestCertificatesV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""CertificatesV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.certificates_v1_api.CertificatesV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_certificates_v1alpha1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCertificatesV1alpha1Api(unittest.TestCase):
22+
class TestCertificatesV1alpha1Api(unittest.IsolatedAsyncioTestCase):
2323
"""CertificatesV1alpha1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.certificates_v1alpha1_api.CertificatesV1alpha1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_coordination_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCoordinationApi(unittest.TestCase):
22+
class TestCoordinationApi(unittest.IsolatedAsyncioTestCase):
2323
"""CoordinationApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.coordination_api.CoordinationApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_coordination_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCoordinationV1Api(unittest.TestCase):
22+
class TestCoordinationV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""CoordinationV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.coordination_v1_api.CoordinationV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_core_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCoreApi(unittest.TestCase):
22+
class TestCoreApi(unittest.IsolatedAsyncioTestCase):
2323
"""CoreApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.core_api.CoreApi() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_core_v1_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCoreV1Api(unittest.TestCase):
22+
class TestCoreV1Api(unittest.IsolatedAsyncioTestCase):
2323
"""CoreV1Api unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.core_v1_api.CoreV1Api() # noqa: E501
2727

2828
def tearDown(self):

kubernetes_asyncio/test/test_custom_objects_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from kubernetes_asyncio.client.rest import ApiException
2020

2121

22-
class TestCustomObjectsApi(unittest.TestCase):
22+
class TestCustomObjectsApi(unittest.IsolatedAsyncioTestCase):
2323
"""CustomObjectsApi unit test stubs"""
2424

25-
def setUp(self):
25+
async def asyncSetUp(self):
2626
self.api = kubernetes_asyncio.client.api.custom_objects_api.CustomObjectsApi() # noqa: E501
2727

2828
def tearDown(self):

0 commit comments

Comments
 (0)