예제 #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')))
예제 #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())
예제 #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())
예제 #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')))