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

Add test for using name template on import_project

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a4df7a91
......@@ -114,6 +114,22 @@ class ImportProjectTest(RepoTestCase):
)
self.assertEqual(project.subproject_set.count(), 1)
def test_import_name(self):
project = self.create_project()
call_command(
'import_project',
'test',
self.git_repo_path,
'master',
'**/*.po',
component_regexp=r'(?P<name>[^/-]*)/.*\.po',
name_template='Test name'
)
self.assertEqual(project.subproject_set.count(), 1)
self.assertTrue(
project.subproject_set.filter(name='Test name').exists()
)
def test_import_re_missing(self):
self.assertRaises(
CommandError,
......
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