<commit_before>"""
Tests for when endpoints are called with unexpected header data.
"""

from datetime import datetime, timedelta
from urllib.parse import urljoin

import pytest
import requests
from constantly import ValueConstant, Values
from freezegun import freeze_time
from requests import codes
from requests.models import Response
from requests_mock import GET

from common.constants import ResultCodes
from tests.conftest import VuforiaServerCredentials
from tests.mock_vws.utils import is_valid_transaction_id
from vws._request_utils import authorization_header, rfc_1123_date


class ROUTES(Values):
    DATABASE_SUMMARY = ValueConstant('/summary')
    TARGET_LIST = ValueConstant('/targets')


ENDPOINTS = [route.value for route in ROUTES.iterconstants()]


def assert_vws_failure(response: Response,<commit_msg>Add docstring<commit_after>"""
Tests for when endpoints are called with unexpected header data.
"""

from datetime import datetime, timedelta
from urllib.parse import urljoin

import pytest
import requests
from constantly import ValueConstant, Values
from freezegun import freeze_time
from requests import codes
from requests.models import Response
from requests_mock import GET

from common.constants import ResultCodes
from tests.conftest import VuforiaServerCredentials
from tests.mock_vws.utils import is_valid_transaction_id
from vws._request_utils import authorization_header, rfc_1123_date


class ROUTES(Values):
    """
    Routes to test headers for.
    """
    DATABASE_SUMMARY = ValueConstant('/summary')
    TARGET_LIST = ValueConstant('/targets')


ENDPOINTS = [route.value for route in ROUTES.iterconstants()]


def assert_vws_failure(response: Response,
{'fraction_non_alphanumeric': 0.057328605200945626, 'fraction_numerical': 0.004728132387706856, 'mean_word_length': 6.054166666666666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '661752', 'n_tokens_mistral': 476, 'n_tokens_neox': 461, 'n_words': 159}