Changeset 738:392f2d7f1f61 in hatta-dev


Ignore:
Timestamp:
01/24/10 13:03:57 (2 years ago)
Author:
sheep@…
Branch:
default
Message:

tests for dirs and symlinks in the repo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test_repo.py

    r737 r738  
    8383                       self.title) 
    8484 
     85    def test_symlinks_not_exist(self, repo): 
     86        """ 
     87        Make sure symlinks are not reported as existing pages. 
     88        """ 
     89 
     90        path = os.path.join(repo.path, self.filename) 
     91        os.symlink('/', path) 
     92        assert self.title not in repo 
     93 
     94    def test_directories_not_exist(self, repo): 
     95        """ 
     96        Make sure direcotries are not reported as existing pages. 
     97        """ 
     98 
     99        path = os.path.join(repo.path, self.filename) 
     100        os.mkdir(path) 
     101        assert self.title not in repo 
     102 
    85103class TestStorage(object): 
    86104    """ 
Note: See TracChangeset for help on using the changeset viewer.