def test_post_mistyped_complaint_data(self, testapp):
        # Set up the extractor
        department = Department.create(name="Good Police Department", short_name="GPD", load_defaults=False)
        extractor, envs = Extractor.from_department_and_password(department=department, password="password")

        # Set the correct authorization
        testapp.authorization = ('Basic', (extractor.username, 'password'))

        # Get a generated list of complaint descriptions from the JSON test client
        test_client = JSONTestClient()
        complaint_count = 1
        complaint_data = test_client.get_prebaked_complaints(last=complaint_count)

        # The app expects number values to be transmitted as strings. Let's change them to integers.
        complaint_data[0]['residentAge'] = 28
        complaint_data[0]['officerAge'] = 46
        complaint_data[0]['officerYearsOfService'] = 17

        # post the json to the complaint URL
        response = testapp.post_json("/data/complaints", params={'month': 0, 'year': 0, 'data': complaint_data})

        # assert that we got the expected reponse
        assert response.status_code == 200
        assert response.json_body['updated'] == 0
        assert response.json_body['added'] == complaint_count

        # check the complaint incident in the database against the data that was sent
        cleaner = Cleaners()
        sent_complaint = cleaner.capitalize_incident(complaint_data[0])
        check_complaint = CitizenComplaint.query.filter_by(opaque_id=sent_complaint['opaqueId']).first()
        assert check_complaint.occured_date.strftime('%Y-%m-%d %-H:%-M:%S') == sent_complaint['occuredDate']
        assert check_complaint.division == sent_complaint['division']
        assert check_complaint.precinct == sent_complaint['precinct']
        assert check_complaint.shift == sent_complaint['shift']
        assert check_complaint.beat == sent_complaint['beat']
        assert check_complaint.disposition == sent_complaint['disposition']
        assert check_complaint.service_type == sent_complaint['serviceType']
        assert check_complaint.source == sent_complaint['source']
        assert check_complaint.allegation_type == sent_complaint['allegationType']
        assert check_complaint.allegation == sent_complaint['allegation']
        assert check_complaint.resident_race == cleaner.race(sent_complaint['residentRace'])
        assert check_complaint.resident_sex == cleaner.sex(sent_complaint['residentSex'])
        assert check_complaint.resident_age == cleaner.number_to_string(sent_complaint['residentAge'])
        assert check_complaint.officer_identifier == sent_complaint['officerIdentifier']
        assert check_complaint.officer_race == cleaner.race(sent_complaint['officerRace'])
        assert check_complaint.officer_sex == cleaner.sex(sent_complaint['officerSex'])
        assert check_complaint.officer_age == cleaner.number_to_string(sent_complaint['officerAge'])
        assert check_complaint.officer_years_of_service == cleaner.number_to_string(sent_complaint['officerYearsOfService'])
Confirm this module is supported by the OS and the system has
dataset/ETHPy150Open codeforamerica/comport/tests/test_extractor_api.py/TestHeartbeat.test_post_mistyped_complaint_data--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/bridge.py/__virtual__