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')))
def test_has_format(self): ctrl = TestDataDirectoryController(self.data) assert_false(ctrl.has_format()) ctrl.mark_dirty() assert_false(ctrl.has_format()) ctrl.data.initfile = os.path.join('source', '__init__.html') assert_true(ctrl.has_format())