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


import random
import re
import string
import unittest
from unittest import mock
from kinto.core.errors import ERRORS
from kinto.core.testing import FormattedErrorMixin
from .support import BaseWebTest, get_user_headers
            headers=self.headers,
            status=400,
        )
        assert resp.json["message"] == "Cannot set status to 'signed'"
        resp = self.app.get(self.source_collection, headers=self.headers)
        assert resp.json["data"]["status"] == "work-in-progress"

    def test_status_can_be_set_to_work_in_progress_manually(self):
        self.app.patch_json(
            self.source_collection,
            {"data": {"status": "to-review"}},
            headers=self.headers,
        )
        self.app.patch_json(
            self.source_collection,
            {"data": {"status": "work-in-progress"}},
            headers=self.headers,
        )

    def test_status_can_be_maintained_as_signed_manually(self):
        self.app.patch_json(
            self.source_collection,
            {"data": {"status": "to-sign"}},
            headers=self.headers,
        )
        # Signature occured, the source collection will be signed.
        self.app.patch_json(
            self.source_collection, {"data": {"status": "signed"}}, headers=self.headers
        )
        self.app.patch_json(

# 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_signoff_flow.py
import random
import re
import string
import unittest
from unittest import mock
from kinto.core.errors import ERRORS
from kinto.core.testing import FormattedErrorMixin
from .support import BaseWebTest, get_user_headers

            headers=self.headers,
            status=400,
        )
        assert resp.json["message"] == "Cannot set status to 'signed'"
        resp = self.app.get(self.source_collection, headers=self.headers)
        assert resp.json["data"]["status"] == "work-in-progress"

    def test_status_can_be_set_to_work_in_progress_manually(self):
        self.app.patch_json(
            self.source_collection,
            {"data": {"status": "to-review"}},
            headers=self.headers,
        )
        self.app.patch_json(
            self.source_collection,
            {"data": {"status": "work-in-progress"}},
            headers=self.headers,
        )

    def test_status_can_be_maintained_as_signed_manually(self):
        self.app.patch_json(
            self.source_collection,
            {"data": {"status": "to-sign"}},
            headers=self.headers,
        )
        # Signature occured, the source collection will be signed.
        self.app.patch_json(
            self.source_collection, {"data": {"status": "signed"}}, headers=self.headers
        )
        self.app.patch_json(

            self.source_collection, {"data": {"author": "dali"}}, headers=self.headers