ashb commented on code in PR #44449:
URL: https://github.com/apache/airflow/pull/44449#discussion_r1861877687
##########
tests/api_fastapi/execution_api/routes/test_variables.py:
##########
@@ -23,10 +23,21 @@
from airflow.models.variable import Variable
+from tests_common.test_utils.db import clear_db_variables
+
pytestmark = pytest.mark.db_test
-class TestGetVariable:
+class TestVariableEndpoint:
+ @pytest.fixture(autouse=True)
+ def setup_method(self) -> None:
+ clear_db_variables()
+
+ def teardown_method(self) -> None:
+ clear_db_variables()
+
+
+class TestGetVariable(TestVariableEndpoint):
Review Comment:
I don't think we need a base class for this -- these can be done like this:
```suggestion
@pytest.fixture(autouse=True)
def setup_method(self) -> None:
clear_db_variables()
yield
clear_db_variables()
class TestGetVariable::
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]