import pytest
import responses
import re
from flask import json
from copy import deepcopy
from json.decoder import JSONDecodeError
from requests import ConnectionError

from backend.util.request.store.search_request import SearchRequest
from backend.util.response.store.search_results import SearchResultsSchema
from backend.util.response.error import ErrorSchema


@pytest.fixture(scope="module")
def request_json():
    return {
        "pricerange": {
            "min": 1000,
            "max": 2000
        }
    }


@pytest.fixture(scope="module")
def response_json():
    return {
        "total": 10,
        "pricerange": {
            "min": 10,
            "max": 20
        },
        "brands": [
            {
                "brand": "string",
                "amount": 10
            }
        ],
        "kinds": [
            {
                "kind": "string",
                "amount": 10
            }
        ]
    }


@pytest.mark.parametrize(
    "ftype",
    [