# Path: kinto-remote-settings/tests/signer/support.py
# class BaseWebTest(CoreWebTest):
#     def __init__(self, *args, **kwargs):
#     def get_app_settings(cls, extras=None):


import datetime
import unittest
import pytest
from unittest import mock
from kinto.core.storage.exceptions import RecordNotFoundError
from kinto_remote_settings.signer.updater import LocalUpdater
from kinto_remote_settings.signer.utils import STATUS
from .support import DummyRequest
            resource_name="collection",
            object_id="destcollection",
            parent_id="/buckets/destbucket",
            obj={"id": 1234, "signature": mock.sentinel.signature},
        )

    def test_set_destination_signature_copies_kinto_admin_ui_fields(self):
        self.storage.get.return_value = {
            "id": 1234,
            "sort": "-age",
            "last_modified": 1234,
        }
        self.updater.set_destination_signature(
            mock.sentinel.signature,
            {"displayFields": ["name"], "sort": "size"},
            DummyRequest(),
        )

        self.storage.update.assert_called_with(
            resource_name="collection",
            object_id="destcollection",
            parent_id="/buckets/destbucket",
            obj={
                "id": 1234,
                "signature": mock.sentinel.signature,
                "sort": "-age",
                "displayFields": ["name"],
            },
        )


# Path: kinto-remote-settings/tests/signer/support.py
# class BaseWebTest(CoreWebTest):
#     def __init__(self, *args, **kwargs):
#     def get_app_settings(cls, extras=None):


# Path: kinto-remote-settings/tests/signer/test_updater.py
import datetime
import unittest
import pytest
from unittest import mock
from kinto.core.storage.exceptions import RecordNotFoundError
from kinto_remote_settings.signer.updater import LocalUpdater
from kinto_remote_settings.signer.utils import STATUS
from .support import DummyRequest

            resource_name="collection",
            object_id="destcollection",
            parent_id="/buckets/destbucket",
            obj={"id": 1234, "signature": mock.sentinel.signature},
        )

    def test_set_destination_signature_copies_kinto_admin_ui_fields(self):
        self.storage.get.return_value = {
            "id": 1234,
            "sort": "-age",
            "last_modified": 1234,
        }
        self.updater.set_destination_signature(
            mock.sentinel.signature,
            {"displayFields": ["name"], "sort": "size"},
            DummyRequest(),
        )

        self.storage.update.assert_called_with(
            resource_name="collection",
            object_id="destcollection",
            parent_id="/buckets/destbucket",
            obj={
                "id": 1234,
                "signature": mock.sentinel.signature,
                "sort": "-age",
                "displayFields": ["name"],
            },
        )


    def test_update_source_status_modifies_the_source_collection(self):