This is an automated email from the ASF dual-hosted git repository. tomaz pushed a commit to branch dependabot/pip/pytest-8.0.2 in repository https://gitbox.apache.org/repos/asf/libcloud.git
The following commit(s) were added to refs/heads/dependabot/pip/pytest-8.0.2 by this push: new 45e955527 Additional changes to the DigitalOcean tests to avoid cross test pollution and related failures when running tests in parallel. 45e955527 is described below commit 45e95552751b9225ee2c0810d7cbb8fdb0ae0e67 Author: Tomaz Muraus <to...@tomaz.me> AuthorDate: Tue Apr 16 19:06:09 2024 +0200 Additional changes to the DigitalOcean tests to avoid cross test pollution and related failures when running tests in parallel. --- libcloud/test/compute/test_digitalocean_v2.py | 3 ++- libcloud/test/dns/test_digitalocean.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libcloud/test/compute/test_digitalocean_v2.py b/libcloud/test/compute/test_digitalocean_v2.py index e5593284d..a8b1c30f6 100644 --- a/libcloud/test/compute/test_digitalocean_v2.py +++ b/libcloud/test/compute/test_digitalocean_v2.py @@ -24,7 +24,7 @@ from libcloud.compute.base import NodeImage from libcloud.test.secrets import DIGITALOCEAN_v1_PARAMS, DIGITALOCEAN_v2_PARAMS from libcloud.utils.iso8601 import UTC from libcloud.test.file_fixtures import ComputeFileFixtures -from libcloud.common.digitalocean import DigitalOcean_v1_Error +from libcloud.common.digitalocean import DigitalOcean_v1_Error, DigitalOceanBaseDriver from libcloud.compute.drivers.digitalocean import DigitalOceanNodeDriver try: @@ -36,6 +36,7 @@ except ImportError: # class DigitalOceanTests(unittest.TestCase, TestCaseMixin): class DigitalOcean_v2_Tests(LibcloudTestCase): def setUp(self): + DigitalOceanBaseDriver.connectionCls.conn_class = DigitalOceanComputeMockHttp DigitalOceanNodeDriver.connectionCls.conn_class = DigitalOceanComputeMockHttp DigitalOceanComputeMockHttp.type = None self.driver = DigitalOceanNodeDriver(*DIGITALOCEAN_v2_PARAMS) diff --git a/libcloud/test/dns/test_digitalocean.py b/libcloud/test/dns/test_digitalocean.py index e65435d45..f2c45162d 100644 --- a/libcloud/test/dns/test_digitalocean.py +++ b/libcloud/test/dns/test_digitalocean.py @@ -21,11 +21,13 @@ from libcloud.dns.types import RecordType from libcloud.utils.py3 import httplib from libcloud.test.secrets import DIGITALOCEAN_v2_PARAMS from libcloud.test.file_fixtures import DNSFileFixtures +from libcloud.common.digitalocean import DigitalOceanBaseDriver from libcloud.dns.drivers.digitalocean import DigitalOceanDNSDriver class DigitalOceanDNSTests(LibcloudTestCase): def setUp(self): + DigitalOceanBaseDriver.connectionCls.conn_class = DigitalOceanDNSMockHttp DigitalOceanDNSDriver.connectionCls.conn_class = DigitalOceanDNSMockHttp DigitalOceanDNSMockHttp.type = None self.driver = DigitalOceanDNSDriver(*DIGITALOCEAN_v2_PARAMS)