Example #1
0
class ZipTests(unittest.TestCase):
    def setUp(self):
        self.foo = ZipFS(FOO_ZIP)

    def testListing1(self):
        listing = self.foo.listdir('/')
        listing.sort()
        self.assertEquals(listing, ['dammit', 'index.html'])
        listing = self.foo.listdir('/dammit')
        listing.sort()
        self.assertEquals(listing, ['index.html'])

    def testExists1(self):
        for f in FOO_LISTING:
            assert self.foo.exists(f)
        for f in ['/doughnut', '/frogling/peach/lumpy/pie', 'pooh', '..']:
            assert not self.foo.exists(f)
class ZipTests(unittest.TestCase):

    def setUp(self):
        self.foo=ZipFS(FOO_ZIP)

    def testListing1(self):
        listing=self.foo.listdir('/')
        listing.sort()
        self.assertEquals(listing, ['dammit', 'index.html'])
        listing=self.foo.listdir('/dammit')
        listing.sort()
        self.assertEquals(listing, ['index.html'])

    def testExists1(self):
        for f in FOO_LISTING:
            assert self.foo.exists(f)
        for f in ['/doughnut', '/frogling/peach/lumpy/pie', 'pooh', '..']:
            assert not self.foo.exists(f)
Example #3
0
 def setUp(self):
     self.foo=ZipFS(FOO_ZIP)