5 ms·
I'm curious to understand what dependency injection is in Django that you're referring to? I know pytest does DI with fixtures, and trying to figure out what y
by bb88 3y ago
I'm curious to understand what dependency injection is in Django that you're referring to?
I know pytest does DI with fixtures, and trying to figure out what you're pulling into a test can be difficult.
- matsemann 3y agoIn django you're importing a default cache, a default storage etc, and write your code to the interface. In settings.py you wire it all up. It's basically the same, for testing you would have to mock the import or provide some implementation.