alphagov/stagecraft — pull request #52 by paulfurley (2014-02-24 13:37:54+00:00)
Title: Don't use mock.patch to disable backdrop connect

mock.patch depends on how the code being patched imports the function
being patched. That means patching is not a reliable way of disabling calls
to that function.

Although globals are horrid and are definitely not thread safe, I
believe this is the best way to achieve the disabling functionality.