add test case

This commit is contained in:
Hans-Christoph Steiner 2025-05-22 12:08:27 +02:00
parent 243a0475f9
commit 8c9b0b3a2a

View File

@ -696,3 +696,12 @@ class CheckupdatesTest(unittest.TestCase):
push.assert_called_once() push.assert_called_once()
sys_exit.assert_called_once() sys_exit.assert_called_once()
self.assertIn(appid, git_repo.heads) self.assertIn(appid, git_repo.heads)
def test_push_commits_invalid_branch_name(self):
git_repo, origin_repo, upstream_repo = self._get_test_git_repos()
for remote in git_repo.remotes:
remote.push(git_repo.active_branch)
self.assertEqual(git_repo.head, upstream_repo.head)
self.assertEqual(origin_repo.head, upstream_repo.head)
# pretend that checkupdates ran but didn't create any new commits
fdroidserver.checkupdates.push_commits('')