sendheaders.py has 5 "parts", many of which are not related in any way. Break at least some of these out into their own tests.
Are you saying that Part 1 should be a separate test, Part 2 should be a separate test, and etc...?
Do you want these in completely separate files, or just each part in a different function?
Ideally, yes. It's possible there are some dependencies, so breaking it up wherever it makes sense is fine. The goal is to separate the test so that each part is in it's own testable, modifiable chunk. There's no need to run a bunch of unrelated tests (and potentially break them with unrelated changes) just because they're part of the same file.