<commit_before>#!/usr/bin/env python3

import asyncio
import sys

from asynctest import CoroutineMock, MagicMock, Mock, patch

import pytest


def pytest_addoption(parser):
    parser.addoption('--spamd-process-timeout', action='store', default=10, type=int)


if sys.platform == 'win32':
    collect_ignore = ['connections/test_unix_connection.py', 'connections/test_unix_connection_manager.py']


@pytest.fixture
def x_headers():
    from aiospamc.header_values import HeaderValue

    return {'A': HeaderValue(value='a'), 'B': HeaderValue(value='b')}


@pytest.fixture
def spam():
    '''Example spam message using SpamAssassin's GTUBE message.'''

    return (b'Subject: Test spam mail (GTUBE)\n'
            b'Message-ID: <<EMAIL>>\n'
            b'Date: Wed, 23 Jul 2003 23:30:00 +0200\n'
            b'From: Sender <<EMAIL>>\n'
            b'To: Recipient <<EMAIL>>\n'
            b'Precedence: junk\n'
            b'MIME-Version: 1.0\n'
            b'Content-Type: text/plain; charset=us-ascii\n'
            b'Content-Transfer-Encoding: 7bit\n\n'
            
            b'This is the GTUBE, the\n'
            b'\tGeneric\n'
            b'\tTest for\n'
            b'\tUnsolicited\n'
            b'\tBulk\n'
            b'\tEmail\n\n'
            
            b'If your spam filter supports it, the GTUBE provides a test by which you\n'
            b'can verify that the filter is installed correctly and is detecting incoming\n'
            b'spam. You can send yourself a test mail containing the following string of\n'
            b'characters (in upper case and with no white spaces and line breaks):\n\n'
            
            b'XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X\n\n'<commit_msg>Updated test fixture for generic header value<commit_after>#!/usr/bin/env python3

import asyncio
import sys

from asynctest import CoroutineMock, MagicMock, Mock, patch

import pytest


def pytest_addoption(parser):
    parser.addoption('--spamd-process-timeout', action='store', default=10, type=int)


if sys.platform == 'win32':
    collect_ignore = ['connections/test_unix_connection.py', 'connections/test_unix_connection_manager.py']


@pytest.fixture
def x_headers():
    from aiospamc.header_values import GenericHeaderValue

    return {'A': GenericHeaderValue(value='a'), 'B': GenericHeaderValue(value='b')}


@pytest.fixture
def spam():
    '''Example spam message using SpamAssassin's GTUBE message.'''

    return (b'Subject: Test spam mail (GTUBE)\n'
            b'Message-ID: <<EMAIL>>\n'
            b'Date: Wed, 23 Jul 2003 23:30:00 +0200\n'
            b'From: Sender <<EMAIL>>\n'
            b'To: Recipient <<EMAIL>>\n'
            b'Precedence: junk\n'
            b'MIME-Version: 1.0\n'
            b'Content-Type: text/plain; charset=us-ascii\n'
            b'Content-Transfer-Encoding: 7bit\n\n'
            
            b'This is the GTUBE, the\n'
            b'\tGeneric\n'
            b'\tTest for\n'
            b'\tUnsolicited\n'
            b'\tBulk\n'
            b'\tEmail\n\n'
            
            b'If your spam filter supports it, the GTUBE provides a test by which you\n'
            b'can verify that the filter is installed correctly and is detecting incoming\n'
            b'spam. You can send yourself a test mail containing the following string of\n'
            b'characters (in upper case and with no white spaces and line breaks):\n\n'
            
            b'XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X\n\n'
{'fraction_non_alphanumeric': 0.1199204319408923, 'fraction_numerical': 0.017050298380221655, 'mean_word_length': 2.4341463414634146, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2310886', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1167, 'n_words': 289}