spulec/freezegun — pull request #17 by schinckel (2013-04-10 11:47:59+00:00)
Title: Ensure unittest.TestCase subclasses will be discovered.

``unittest`` test discovery generally looks for classes that are a subclass of ``unittest.TestCase``.

When a class is decorated, a function object is returned. This will not be discovered by the test discovery tools.

Instead, we can inject a Mixin, that calls ``freezer.start()`` before ``.setUp()``, and ``freezer.stop()`` after ``.tearDown()``.

Since django uses unittest.TestCase subclasses, this patch enables decorating django test case subclasses, too.

Tests are included.

Resolves #16.