Description
When using pytest-iam with Pydantic v2, an error occurs during fixture initialization.
Environment
- Python: 3.12
- Pydantic: 2.x
- pytest-iam: latest
Error
TypeError: CoreSettings.default_database_config() missing 1 required positional argument: 'self'
Steps to Reproduce
- Install pytest-iam in a project using Pydantic v2
- Use the
iam fixture in a test
- Run pytest
Expected Behavior
The iam fixture should initialize correctly and provide a mock OIDC server.
Actual Behavior
The fixture fails with a TypeError because default_database_config is being called as a class method instead of an instance method.
Related
This appears to be related to Pydantic v2 migration issues. See: pydantic/pydantic#10551
Workaround
Currently using mocked OIDC authentication directly instead of pytest-iam.