Use Pydantic to generate and validate CodeTF data models#357
Conversation
8c67680 to
1c925ae
Compare
|
| import requests | ||
|
|
||
|
|
||
| @pytest.fixture(scope="module") |
There was a problem hiding this comment.
This new fixture means every time a test module runs we're making a request. I see this is also defined below, so now both unit tests and integration tests rely on internet connectivity. Just pointing that out.
Do we need it per module, or could this fixture run per test run session only?
There was a problem hiding this comment.
@clavedeluna good catch. I did think about making it session scoped but I think we're running unit tests and integration tests in separate workflows so it would run twice anyway.
| references: Optional[list[Reference]] = None | ||
| properties: Optional[dict] = None | ||
| failedFiles: Optional[list[str]] = None | ||
| changeset: list[ChangeSet] |
There was a problem hiding this comment.
should this have = []?
There was a problem hiding this comment.
Hmm I don't think it's strictly necessary since this is a required field but it might be a good idea.




Overview
Use
pydanticto generate and validate CodeTF modelsDescription