diff --git a/pagure/__init__.py b/pagure/__init__.py index 9fcfa8b..f289436 100644 --- a/pagure/__init__.py +++ b/pagure/__init__.py @@ -84,7 +84,7 @@ class RepoConverter(BaseConverter): a single slash. :param map: the :class:`Map`. """ - regex = '[^/]*/?[^/]*' + regex = '[^/]*(/[^/]+)?' #weight = 200 diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py index 8e8f396..ffc6e0c 100644 --- a/tests/test_pagure_flask_ui_repo.py +++ b/tests/test_pagure_flask_ui_repo.py @@ -529,6 +529,13 @@ class PagureFlaskRepotests(tests.Modeltests): '
\n' 'test project #1
', output.data) + output = self.app.get('/test/') + self.assertEqual(output.status_code, 200) + self.assertTrue('

This repo is brand new!

' in output.data) + self.assertIn( + '
\n' + 'test project #1
', output.data) + # Add some content to the git repo tests.add_content_git_repo(os.path.join(tests.HERE, 'test.git')) tests.add_readme_git_repo(os.path.join(tests.HERE, 'test.git'))