| """ |
| |
| """ |
| from django.test import TestCase |
| from data_pipeline.interfaces.api_client import DataClient |
|
|
|
|
| class TestDataClient(TestCase): |
| def test_extract_raises_exception_on_instantiation(self): |
| with self.assertRaises(TypeError): |
| data_client = DataClient() |
|
|
| def test_extract_raises_exception_without_api_url(self): |
| class NewDataClientWithoutFunctionOverride(DataClient): |
| def __init__(self) -> None: |
| pass |
|
|
| with self.assertRaises(TypeError): |
| data_client = NewDataClientWithoutFunctionOverride() |
|
|
| def test_inherited_class(self): |
| class NewDataClientWith3FunctionOverride(DataClient): |
| def __init__(self) -> None: |
| pass |
|
|
| def extract(self): |
| pass |
|
|
| def transform(self): |
| pass |
|
|
| def load(self): |
| pass |
|
|
| data_client = NewDataClientWith3FunctionOverride() |
|
|