I'm used to using AutoFixture.AutoMoq with C# and wanted to know if something similar is available for Python. I'm not using django or databases, so django-autofixture
is not going to help me.
What I'm looking for is something that cuts down on the code I need to write to setup all my interrelated objects with stubs/mocks for testing. I'm using the IoC pattern for design (but no DI framework since Python doesn't really need them).
I'm using Nose and Fudge.
Try looking at Mock
It allows you to mock out classes
Patch functions
And then assert how many times that you've called a function
So say you have a class structure as you describe.
Then if you want to mock out A
Going down the line:
It will all be mocked out for you regardless of how tight you've coupled your code. I imagine there are similar ways to do this for Fudge