diff --git a/pagure/lib/git.py b/pagure/lib/git.py index 6eda762..c7e8547 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -1336,7 +1336,7 @@ def get_diff_info(repo_obj, orig_repo, branch_from, branch_to, prid=None): ''' frombranch = repo_obj.lookup_branch(branch_from) - if not frombranch and not repo_obj.is_empty and prid is None: + if not frombranch and not repo_obj.is_empty and prid is None: raise pagure.exceptions.BranchNotFoundException( 'Branch %s does not exist' % branch_from ) diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py index 66ce171..ffd9cf4 100644 --- a/tests/test_pagure_flask_ui_fork.py +++ b/tests/test_pagure_flask_ui_fork.py @@ -723,8 +723,8 @@ class PagureFlaskForktests(tests.Modeltests): self.assertIn( '
Fork is empty, there are no commits to create a ' - 'pull request with
', output.data) + 'No branch from which to pull or local PR reference ' + 'were found
', output.data) output = self.app.get('/test/new_issue') csrf_token = self.get_csrf(output=output) @@ -1552,8 +1552,8 @@ index 0000000..2a552bb '/test/diff/master..feature', data=data, follow_redirects=True) self.assertEqual(output.status_code, 400) self.assertIn( - 'Fork is empty, there are no commits to create a ' - 'pull request with
', output.data) + 'No branch from which to pull or local PR reference ' + 'were found
', output.data) shutil.rmtree(newpath) @@ -1587,8 +1587,8 @@ index 0000000..2a552bb '/fork/foo/test/diff/master..master', follow_redirects=True) self.assertEqual(output.status_code, 400) self.assertIn( - 'Fork is empty, there are no commits to create a ' - 'pull request with
', output.data) + 'No branch from which to pull or local PR reference ' + 'were found
', output.data) shutil.rmtree(newpath) diff --git a/tests/test_pagure_lib_notify.py b/tests/test_pagure_lib_notify.py index b8b302d..e917098 100644 --- a/tests/test_pagure_lib_notify.py +++ b/tests/test_pagure_lib_notify.py @@ -342,7 +342,7 @@ class PagureLibNotifytests(tests.Modeltests): 'Email “Subject“', 'foo@bar.com,zöé@foo.net', mail_id='test-pull-request-2edbf96ebe644f4bb31b94605e-1', - in_reply_to='test-pull-request-2edbf96ebe644f4bb31b94605e@pagure', + in_reply_to='test-pull-request-2edbf96ebe644f4bb31b94605e', project_name='namespace/project', user_from='Zöé', ) @@ -353,7 +353,7 @@ Subject: =?utf-8?b?W25hbWVzcGFjZS9wcm9qZWN0XSBFbWFpbCDigJxTdWJqZWN04oCc?= From: =?utf-8?b?WsO2w6k=?=