Wrap mock import in try-except, skip if not available
Remove trailing whitespace and tabs
Serious PEP8 and styling fixes
Make sure patch is defined (otherwise the decorator complains)
Can't use pass in lambdas
Fix it so we define patch correctly

Must be a function that returns a function, so it works as a decorator
Wrap mock import to avoid ImportErrors
Remove trailing whitespace and fix PEP8 issues
Fix lambda (last time?)

Apparently I have no idea what I'm doing.
Add skipIf decorator
Wrap extra Mock() references
Define patch.multiple
Fix patch.multiple (wrong order on function defs)
Merge pull request #4193 from basepi/testfixes

Fix some unsafe imports in tests