alphagov/stagecraft — pull request #27 by paulfurley (2014-02-11 11:33:05+00:00)
Title: Factor out create/tear down of data[group|type]

... in tests.

The temporary test database exists for duration of the whole test *file*
so its important that temporary things like data_types and data_groups
are cleaned up at the end of test group.

I factored this out into the setUpClass() and tearDownClass() methods
for the test classes, and a context manager for the function-tests.