Skip to content

Commit aa2bfcf

Browse files
committed
fixup! Add HasCachedHttpClient mixin to AzulTestCase
1 parent c0d04cf commit aa2bfcf

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/azul_test_case.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
)
5757
from azul.http import (
5858
HasCachedHttpClient,
59-
HttpClient,
6059
)
6160
from azul.indexer import (
6261
Prefix,
@@ -94,7 +93,7 @@ def patch_config(name: str, value: str) -> Patch:
9493
return patch.object(Config, name, new=PropertyMock(return_value=value))
9594

9695

97-
class AzulTestCase(TestCase):
96+
class AzulTestCase(TestCase, HasCachedHttpClient):
9897
_catch_warnings: Optional[AbstractContextManager]
9998
_caught_warnings: list[warnings.WarningMessage]
10099

@@ -235,8 +234,12 @@ def stacked_patches(self, patches: Iterable[Patch]):
235234
context.enter_context(cm)
236235
yield
237236

237+
@classmethod
238+
def http_client(cls):
239+
return cls._http_client
240+
238241

239-
class AzulUnitTestCase(AzulTestCase, HasCachedHttpClient):
242+
class AzulUnitTestCase(AzulTestCase):
240243

241244
@classmethod
242245
def setUpClass(cls) -> None:
@@ -349,9 +352,6 @@ def _patch_valid_schema_domains(cls):
349352
attribute='valid_schema_domains',
350353
new=cls.valid_schema_domains))
351354

352-
def http(self) -> HttpClient:
353-
return self._http_client
354-
355355

356356
class CatalogTestCase(AzulUnitTestCase, metaclass=ABCMeta):
357357
catalog: CatalogName = 'test'

0 commit comments

Comments
 (0)