Ejemplo n.º 1
0
class DirListerTests(unittest.TestCase):
    def setUp(self):
        from khufu_siteview.templatedir import DirLister
        self.lister = DirLister()

    def test_is_valid_file(self):
        self.assertTrue(self.lister.is_valid_file('foobar'))
        self.assertFalse(self.lister.is_valid_file('foobar~'))

    def test_listdir(self):
        self.lister.root_listdir = lambda x: ['abc', 'def', 'ghi~']
        self.assertEqual(self.lister.listdir(''), ['abc', 'def'])
Ejemplo n.º 2
0
class DirListerTests(unittest.TestCase):

    def setUp(self):
        from khufu_siteview.templatedir import DirLister
        self.lister = DirLister()

    def test_is_valid_file(self):
        self.assertTrue(self.lister.is_valid_file('foobar'))
        self.assertFalse(self.lister.is_valid_file('foobar~'))

    def test_listdir(self):
        self.lister.root_listdir = lambda x: ['abc', 'def', 'ghi~']
        self.assertEqual(self.lister.listdir(''), ['abc', 'def'])
Ejemplo n.º 3
0
 def setUp(self):
     from khufu_siteview.templatedir import DirLister
     self.lister = DirLister()
Ejemplo n.º 4
0
 def setUp(self):
     from khufu_siteview.templatedir import DirLister
     self.lister = DirLister()