Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/api/test_deposit_status.py
# Copyright (C) 2017-2019 The Software Heritage developers | # Copyright (C) 2017-2020 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 General Public License version 3, or any later version | # License: GNU 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 | ||||
from django.urls import reverse | from django.urls import reverse | ||||
from io import BytesIO | from io import BytesIO | ||||
from rest_framework import status | from rest_framework import status | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | def test_status_complete_deposit(authenticated_client, complete_deposit): | ||||
assert r["deposit_status"] == DEPOSIT_STATUS_LOAD_SUCCESS | assert r["deposit_status"] == DEPOSIT_STATUS_LOAD_SUCCESS | ||||
assert ( | assert ( | ||||
r["deposit_status_detail"] == DEPOSIT_STATUS_DETAIL[DEPOSIT_STATUS_LOAD_SUCCESS] | r["deposit_status_detail"] == DEPOSIT_STATUS_DETAIL[DEPOSIT_STATUS_LOAD_SUCCESS] | ||||
) | ) | ||||
assert deposit.swh_id is not None | assert deposit.swh_id is not None | ||||
assert r["deposit_swh_id"] == deposit.swh_id | assert r["deposit_swh_id"] == deposit.swh_id | ||||
assert deposit.swh_id_context is not None | assert deposit.swh_id_context is not None | ||||
assert r["deposit_swh_id_context"] == deposit.swh_id_context | assert r["deposit_swh_id_context"] == deposit.swh_id_context | ||||
assert deposit.swh_anchor_id is not None | |||||
assert r["deposit_swh_anchor_id"] == deposit.swh_anchor_id | |||||
assert deposit.swh_anchor_id_context is not None | |||||
assert r["deposit_swh_anchor_id_context"] == deposit.swh_anchor_id_context |