Commit d5e31a98 authored by Michal Čihař's avatar Michal Čihař

Test extra commit file validation

parent 124671f6
......@@ -403,10 +403,31 @@ class SubProjectTest(RepoTestCase):
project = self.create_link()
self.verify_subproject(project, 3, 'cs', 4)
def test_extra_file(self):
'''
Extra commit file validation.
'''
project = self.create_subproject()
project.full_clean()
project.extra_commit_file = 'locale/list.txt'
project.full_clean()
project.extra_commit_file = 'locale/%(language)s.txt'
project.full_clean()
project.extra_commit_file = 'locale/%(bar)s.txt'
self.assertRaisesMessage(
ValidationError,
"Bad format string ('bar')",
project.full_clean
)
def test_validation(self):
project = self.create_subproject()
# Correct project
project.full_clean()
# Invalid mask
project.filemask = 'foo/x.po'
self.assertRaisesMessage(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment