<commit_before>from __future__ import absolute_import
from __future__ import unicode_literals

from mock import patch

from custom.icds_reports.ucr.tests.test_base_form_ucr import BaseFormsTest


@patch('custom.icds_reports.ucr.expressions._get_user_location_id',
       lambda user_id: 'qwe56poiuytr4xcvbnmkjfghwerffdaa')
@patch('corehq.apps.locations.ucr_expressions._get_location_type_name',
       lambda loc_id, context: 'awc')
class TestTHRFormsV2(BaseFormsTest):
    ucr_name = "static-icds-cas-static-thr_forms_v2"

    def test_with_image_taken(self):
        self._test_data_source_results(
            'thr_form_v2',
            [{'count': 1,
                "doc_id": None,
                "submitted_on": None,
                'image_name': u'1558605103125.jpg',
              }
             ])

    def test_with_image_taken(self):
        self._test_data_source_results(
            'thr_form_v2_without_image',
            [{'count': 1,
                "doc_id": None,
                "submitted_on": None,
                'image_name': None
              }])
<commit_msg>Changed method name<commit_after>from __future__ import absolute_import
from __future__ import unicode_literals

from mock import patch

from custom.icds_reports.ucr.tests.test_base_form_ucr import BaseFormsTest


@patch('custom.icds_reports.ucr.expressions._get_user_location_id',
       lambda user_id: 'qwe56poiuytr4xcvbnmkjfghwerffdaa')
@patch('corehq.apps.locations.ucr_expressions._get_location_type_name',
       lambda loc_id, context: 'awc')
class TestTHRFormsV2(BaseFormsTest):
    ucr_name = "static-icds-cas-static-thr_forms_v2"

    def test_with_image_taken(self):
        self._test_data_source_results(
            'thr_form_v2',
            [{'count': 1,
                "doc_id": None,
                "submitted_on": None,
                'image_name': u'1558605103125.jpg',
              }
             ])

    def test_without_image_taken(self):
        self._test_data_source_results(
            'thr_form_v2_without_image',
            [{'count': 1,
                "doc_id": None,
                "submitted_on": None,
                'image_name': ''
              }])

{'fraction_non_alphanumeric': 0.0961978928080623, 'fraction_numerical': 0.02015574896930829, 'mean_word_length': 2.5169082125603865, 'pattern_counts': {'":': 8, '<': 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': '1554927', 'n_tokens_mistral': 767, 'n_tokens_neox': 708, 'n_words': 107}