Changeset 750:e25458e9bfb1 in hatta-dev
- Timestamp:
- 01/25/10 15:16:53 (2 years ago)
- Branch:
- default
- Files:
-
- 2 edited
-
hatta.py (modified) (1 diff)
-
tests/test_repo.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hatta.py
r749 r750 706 706 try: 707 707 os.makedirs(dir_path) 708 except OSError: 709 pass 708 except OSError, e: 709 if e.errno != 17 or not os.path.isdir(dir_path): 710 raise werkzeug.exceptions.Forbidden( 711 _(u"Can't make subpages of existing pages")) 710 712 super(WikiSubdirectoryStorage, self).save_file(title, file_name, 711 713 author, comment, parent) -
tests/test_repo.py
r747 r750 116 116 assert not exists 117 117 118 def test_create_parent(self, subdir_repo): 119 """ 120 Make sure you can't create a parent page of existsing page. 121 """ 122 123 subdir_repo.save_text(u'xxx/yyy', self.text, self.author, self.comment, 124 parent=-1) 125 py.test.raises(werkzeug.exceptions.Forbidden, subdir_repo.save_text, 126 u'xxx', self.text, self.author, self.comment, 127 parent=-1) 128 129 def test_create_subpage(self, subdir_repo): 130 """ 131 Make sure you can't create a subpage of existsing page. 132 """ 133 134 subdir_repo.save_text(u'xxx', self.text, self.author, self.comment, 135 parent=-1) 136 py.test.raises(werkzeug.exceptions.Forbidden, subdir_repo.save_text, 137 u'xxx/yyy', self.text, self.author, self.comment, 138 parent=-1) 118 139 119 140 class TestMercurialStorage(object): … … 226 247 py.test.raises(werkzeug.exceptions.Forbidden, repo.delete_page, 227 248 self.title, self.author, self.comment) 249 228 250 229 251 class TestStorage(object):
Note: See TracChangeset
for help on using the changeset viewer.
