Ejemplo n.º 1
0
 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')))
Ejemplo n.º 2
0
 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())
Ejemplo n.º 3
0
 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())
Ejemplo n.º 4
0
 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')))