Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask DI: Try FastDepends lib #5

Open
jonathanmach opened this issue Nov 23, 2024 · 1 comment · Fixed by #11
Open

Flask DI: Try FastDepends lib #5

jonathanmach opened this issue Nov 23, 2024 · 1 comment · Fixed by #11

Comments

@jonathanmach
Copy link
Owner

FastDepends: FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. This is a small library which provides you with the ability to use lovely FastAPI interfaces in your own projects or tools.

@jonathanmach
Copy link
Owner Author

I can't seem to be able to override a service with a Fake during tests. I get an is_instance_of error:

pydantic_core._pydantic_core.ValidationError: 1 validation error for my_webhook2
webhooks_service
Input should be an instance of WebhookService [type=is_instance_of, input_value=<test_app_3_fastdepends.g...bject at 0xffff9bc4eaa0>, input_type=get_fake_webhook_service.<locals>.FakeWebhookService]

I've reached out for support under ticket: Lancetnik/FastDepends#150

@jonathanmach jonathanmach linked a pull request Nov 30, 2024 that will close this issue
@jonathanmach jonathanmach reopened this Nov 30, 2024
jonathanmach added a commit that referenced this issue Nov 30, 2024
jonathanmach added a commit that referenced this issue Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant