I'll just describe my insight and share some links.
First of all, the good thing you are already doing is that you are separating functional and unit tests.
Also, I prefer to follow the "one test case per file" and "as few assertions per test method as possible" rules.
But, sometimes, you want to test, for example, different "modes" of one view, let's say: change password view can be called if the user just wants to change a password and if the user forgets it and changes the password using temporary one. In this case, it's probably a good idea to split the view test into two TestCase
s, each for different mode. In this situation, you can either put both test cases into the same file, or create a package with two separate files. It usually depends on the test complexity, size and readability.
And, also, actually, Zen of Python principles could help:
- Flat is better than nested. (probably don't have multiple test cases per file)
- Readability counts. (if a test case is huge, probably you need to split it into logical parts)
Also some links on the subject:
- Testing in Django - Best practices and examples
- Testing and Django by Carl Meyer (I personally follow a lot of his guidelines)
- Django Testing: Test Organization and Some Best Practices
Also, it's worth looking at how django itself organizes tests.
Hope that helps.