gitweb: tests faiilng due to change of default branch name
Recent versions of git change the default branch name from master
to main
. Gitweb tests will need to be updated.
___________________________________________ test_get_branches ____________________________________________
call_action = <function fixture_call_action.<locals>._call_action at 0x7fe934ced790>, existing_repo = None
def test_get_branches(call_action, existing_repo):
"""Test getting all the branches of the repository."""
> assert json.loads(call_action(['get-branches', '--name', REPO_NAME])) == {
"default_branch": "master",
"branches": []
}
E AssertionError: assert {'branches': ...anch': 'main'} == {'branches': ...ch': 'master'}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'default_branch': 'main'} != {'default_branch': 'master'}
E Use -v to get the full diff
plinth/modules/gitweb/tests/test_actions.py:115: AssertionError