SteveK, thanks I'll look into dropping the unittest stuff.
Tim, yeah the SPN is used to manually construct a distribution_source_package object, which requires having a distribution object. Unfortunately since the user is coming in off the bugtracker page there is (afaik) no context to auto-magically discern what distro they're on. The only ideas I had got to be comically hard or would impose silly UI on the user (like a dropdown with all distros to choose from, even though only 1 distro makes any sense to choose).
But yeah, I can move the linking code into the model. I'd considered that but opted to be lazy. ;-)
SteveK, thanks I'll look into dropping the unittest stuff.
Tim, yeah the SPN is used to manually construct a distribution_ source_ package object, which requires having a distribution object. Unfortunately since the user is coming in off the bugtracker page there is (afaik) no context to auto-magically discern what distro they're on. The only ideas I had got to be comically hard or would impose silly UI on the user (like a dropdown with all distros to choose from, even though only 1 distro makes any sense to choose).
But yeah, I can move the linking code into the model. I'd considered that but opted to be lazy. ;-)