Fix files that do work on import instead of only if __name__ == __main__

[`setUp`](https://docs.python.org/2/library/unittest.html#unittest.TestCase.setUp) is executed before each test, [`setUpClass`](https://docs.python.org/2/library/unittest.html#unittest.TestCase.setUpClass) is executed once.