Promote focused small-building detector
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas import detection, segmentation
|
||||
|
||||
|
||||
def test_model_prefixed_api_fields_are_explicitly_supported() -> None:
|
||||
schemas = [
|
||||
value
|
||||
for module in (detection, segmentation)
|
||||
for value in vars(module).values()
|
||||
if isinstance(value, type)
|
||||
and issubclass(value, BaseModel)
|
||||
and any(field_name.startswith("model_") for field_name in value.model_fields)
|
||||
]
|
||||
|
||||
assert schemas
|
||||
assert all(schema.model_config.get("protected_namespaces") == () for schema in schemas)
|
||||
Reference in New Issue
Block a user