|
|
|
|
|
by andrewmatte
2297 days ago
|
|
My best advice for you is to write modular functions that can be tested separately rather than integrated stuff that can't be disentangled. A unit test should test the functionality of a single chunk of code. What kind of stuff are you writing? I write webservers most of the time. So what I do is, at the top level of the request, immediately pull data off of the request so that I can access to the data in native python types that are easy to mock for testing. Each layer of my webserver does only one thing which could be gluing the auth+services together, but is still easy to mock. |
|