Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/browse/views/test_revision.py
# Copyright (C) 2017-2021 The Software Heritage developers | # Copyright (C) 2017-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import json | import json | ||||
import random | import random | ||||
from hypothesis import given | from hypothesis import given | ||||
from django.utils.html import escape | from django.utils.html import escape | ||||
from swh.model.hashutil import hash_to_bytes, hash_to_hex | from swh.model.hashutil import hash_to_bytes, hash_to_hex | ||||
from swh.model.identifiers import ObjectType | |||||
from swh.model.model import Revision, RevisionType, TimestampWithTimezone | from swh.model.model import Revision, RevisionType, TimestampWithTimezone | ||||
from swh.model.swhids import ObjectType | |||||
from swh.web.common.identifiers import gen_swhid | from swh.web.common.identifiers import gen_swhid | ||||
from swh.web.common.utils import format_utc_iso_date, parse_iso8601_date_to_utc, reverse | from swh.web.common.utils import format_utc_iso_date, parse_iso8601_date_to_utc, reverse | ||||
from swh.web.tests.django_asserts import assert_contains, assert_not_contains | from swh.web.tests.django_asserts import assert_contains, assert_not_contains | ||||
from swh.web.tests.strategies import ( | from swh.web.tests.strategies import ( | ||||
directory, | directory, | ||||
new_origin, | new_origin, | ||||
new_person, | new_person, | ||||
new_swh_date, | new_swh_date, | ||||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |