Fix test failures and a small rewrite of celery_instance.
Merge pull request #1351 from bmbouter/fix-2.6-test-errors

Fix two tests that fail when coverage is enabled