from unittest.mock import Mock from g2h.overview_page import OverviewPage def test_init(): commit = Mock() commit.committed_datetime = '2025-04-01T12:34:56+00:00' page = OverviewPage('test/overview', 'overview test', 'test branch', 'test tag', 'overview/sub/dir', commit) context = page.context() assert(context['title'] == 'overview test') assert(context['branches'] == 'test branch') assert(context['tags'] == 'test tag') assert(context['content_subdir'] == 'overview/sub/dir') assert(context['latest_commit_date'] == '2025-04-01T12:34:56+00:00')