# 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
        self.updater.get_source_records()
        self.storage.list_all.assert_called_with(
            resource_name="record",
            parent_id="/buckets/sourcebucket/collections/sourcecollection",
        )

    def test_get_destination_records(self):
        # We want to test get_destination_records with some records.
        records = [
            {"id": idx, "foo": "bar %s" % idx, "last_modified": 42 - idx}
            for idx in range(1, 4)
        ]
        self.storage.list_all.return_value = records
        self.updater.get_destination_records()
        self.storage.resource_timestamp.assert_called_with(
            resource_name="record",
            parent_id="/buckets/destbucket/collections/destcollection",
        )
        self.storage.list_all.assert_called_with(
            resource_name="record",
            parent_id="/buckets/destbucket/collections/destcollection",
        )

    def test_push_records_to_destination(self):
        self.patch(self.updater, "get_destination_records", return_value=([], 1324))
        records = [
            {"id": idx, "foo": "bar %s" % idx, "last_modified": 42 - idx}
            for idx in range(1, 4)
        ]
        self.patch(self.updater, "get_source_records", return_value=(records, 1325))

# 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

        self.updater.get_source_records()
        self.storage.list_all.assert_called_with(
            resource_name="record",
            parent_id="/buckets/sourcebucket/collections/sourcecollection",
        )

    def test_get_destination_records(self):
        # We want to test get_destination_records with some records.
        records = [
            {"id": idx, "foo": "bar %s" % idx, "last_modified": 42 - idx}
            for idx in range(1, 4)
        ]
        self.storage.list_all.return_value = records
        self.updater.get_destination_records()
        self.storage.resource_timestamp.assert_called_with(
            resource_name="record",
            parent_id="/buckets/destbucket/collections/destcollection",
        )
        self.storage.list_all.assert_called_with(
            resource_name="record",
            parent_id="/buckets/destbucket/collections/destcollection",
        )

    def test_push_records_to_destination(self):
        self.patch(self.updater, "get_destination_records", return_value=([], 1324))
        records = [
            {"id": idx, "foo": "bar %s" % idx, "last_modified": 42 - idx}
            for idx in range(1, 4)
        ]
        self.patch(self.updater, "get_source_records", return_value=(records, 1325))

        self.updater.push_records_to_destination(DummyRequest())