def test_set_format(self): ctrl = TestDataDirectoryController(self.data) assert_false(ctrl.has_format()) ctrl.set_format('txt') assert_true(ctrl.has_format()) assert_equals(ctrl.source, os.path.abspath(os.path.join('source', '__init__.txt')))