<commit_before># -*- coding: utf-8 -*-
import os
import unittest

from openprocurement.api.tests.base import BaseWebTest, snitch

from openprocurement.tender.belowthreshold.tests.base import (
    test_tender_data, BaseTenderWebTest
)
from openprocurement.tender.belowthreshold.tests.tender_blanks import (
    # TenderResourceTest
    listing,
    get_tender,
    tender_features_invalid,
    tender_not_found,
    dateModified_tender,
    guarantee,
    tender_Administrator_change,
    listing_draft,
    tender_fields,
    listing_changes,
    create_tender_invalid,
    create_tender_generated,
    create_tender_draft,
    tender_features,
    patch_tender_jsonpatch,
    patch_tender,
    required_field_deletion,
    # TenderProcessTest
    one_valid_bid_tender,
    one_invalid_bid_tender,
    first_bid_tender,
    create_tender,
    invalid_tender_conditions,
    lost_contract_for_active_award,
    # TestCoordinatesRegExp
    coordinates_reg_exp,
    # TenderTest
    simple_add_tender,
)


class TenderTest(BaseWebTest):
    initial_data = test_tender_data
    relative_to = os.path.dirname(__file__)

    test_simple_add_tender = snitch(simple_add_tender)


class TestCoordinatesRegExp(unittest.TestCase):

    test_coordinates_reg_exp = snitch(coordinates_reg_exp)


class TenderResourceTest(BaseWebTest):
    initial_data = test_tender_data
    initial_auth = ('Basic', ('broker', ''))
    relative_to = os.path.dirname(__file__)
    test_tender_status = 'active.enquiries'

    test_listing = snitch(listing)
    test_get_tender = snitch(get_tender)
    test_tender_features_invalid = snitch(tender_features_invalid)
    test_tender_not_found = snitch(tender_not_found)
    test_dateModified_tender = snitch(dateModified_tender)
    test_guarantee = snitch(guarantee)
    test_tender_Administrator_change = snitch(tender_Administrator_change)
    test_listing_draft = snitch(listing_draft)
    test_listing_changes = snitch(listing_changes)
    test_create_tender_invalid = snitch(create_tender_invalid)
    test_create_tender_generated = snitch(create_tender_generated)
    test_create_tender_draft = snitch(create_tender_draft)
    test_create_tender = snitch(create_tender)
    test_tender_fields = snitch(tender_fields)
    test_tender_features = snitch(tender_features)
    test_patch_tender_jsonpatch = snitch(patch_tender_jsonpatch)
    test_patch_tender = snitch(patch_tender)
    test_required_field_deletion = snitch(required_field_deletion)


class TenderProcessTest(BaseTenderWebTest):
    initial_auth = ('Basic', ('broker', ''))
    relative_to = os.path.dirname(__file__)
<commit_msg>create basic abstract classes for tender module<commit_after># -*- coding: utf-8 -*-
import os
import unittest

from openprocurement.api.tests.base import BaseWebTest, snitch

from openprocurement.tender.belowthreshold.tests.base import (
    test_tender_data, BaseTenderWebTest
)
from openprocurement.tender.belowthreshold.tests.tender_blanks import (
    # TenderResourceTest
    listing,
    get_tender,
    tender_features_invalid,
    tender_not_found,
    dateModified_tender,
    guarantee,
    tender_Administrator_change,
    listing_draft,
    tender_fields,
    listing_changes,
    create_tender_invalid,
    create_tender_generated,
    create_tender_draft,
    tender_features,
    patch_tender_jsonpatch,
    patch_tender,
    required_field_deletion,
    # TenderProcessTest
    one_valid_bid_tender,
    one_invalid_bid_tender,
    first_bid_tender,
    create_tender,
    invalid_tender_conditions,
    lost_contract_for_active_award,
    # TestCoordinatesRegExp
    coordinates_reg_exp,
    # TenderTest
    simple_add_tender,
)


class TenderResourceTestMixin(object):
    test_listing_changes = snitch(listing_changes)
    test_listing_draft = snitch(listing_draft)
    test_listing = snitch(listing)
    test_create_tender_draft = snitch(create_tender_draft)
    test_create_tender = snitch(create_tender)
    test_tender_features = snitch(tender_features)
    test_get_tender = snitch(get_tender)
    test_tender_features_invalid = snitch(tender_features_invalid)
    test_dateModified_tender = snitch(dateModified_tender)
    test_tender_not_found = snitch(tender_not_found)
    test_tender_Administrator_change = snitch(tender_Administrator_change)


class TenderTest(BaseWebTest):
    initial_data = test_tender_data
    relative_to = os.path.dirname(__file__)

    test_simple_add_tender = snitch(simple_add_tender)


class TestCoordinatesRegExp(unittest.TestCase):

    test_coordinates_reg_exp = snitch(coordinates_reg_exp)


class TenderResourceTest(BaseWebTest, TenderResourceTestMixin):
    initial_data = test_tender_data
    initial_auth = ('Basic', ('broker', ''))
    relative_to = os.path.dirname(__file__)
    test_tender_status = 'active.enquiries'

    test_guarantee = snitch(guarantee)
    test_create_tender_invalid = snitch(create_tender_invalid)
    test_create_tender_generated = snitch(create_tender_generated)
    test_tender_fields = snitch(tender_fields)
    test_patch_tender_jsonpatch = snitch(patch_tender_jsonpatch)
    test_patch_tender = snitch(patch_tender)
    test_required_field_deletion = snitch(required_field_deletion)


class TenderProcessTest(BaseTenderWebTest):
    initial_auth = ('Basic', ('broker', ''))
    relative_to = os.path.dirname(__file__)

{'fraction_non_alphanumeric': 0.06749156355455568, 'fraction_numerical': 0.0003749531308586427, 'mean_word_length': 5.203488372093023, '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': '931411', 'n_tokens_mistral': 1809, 'n_tokens_neox': 1781, 'n_words': 239}