def METHOD_NAME(self, debug, record_video, record_har, keep_records, revert):
    def get_value(value):
        if value is None:
            return True
        return value if not revert else not value
    def get_keep_records(value):
        if value is None:
            return 3
        return value if not revert else value + 1
    with patch('monitorrent.settings_manager.SettingsManager.cloudflare_challenge_solver_debug',
               new_callable=PropertyMock) as cloudflare_challenge_solver_debug_mock,\
         patch('monitorrent.settings_manager.SettingsManager.cloudflare_challenge_solver_record_video',
               new_callable=PropertyMock) as cloudflare_challenge_solver_record_video_mock,\
         patch('monitorrent.settings_manager.SettingsManager.cloudflare_challenge_solver_record_har',
               new_callable=PropertyMock) as cloudflare_challenge_solver_record_har_mock,\
         patch('monitorrent.settings_manager.SettingsManager.cloudflare_challenge_solver_keep_records',
               new_callable=PropertyMock) as cloudflare_challenge_solver_keep_records_mock:
        cloudflare_challenge_solver_debug_mock.return_value = get_value(debug)
        cloudflare_challenge_solver_record_video_mock.return_value = get_value(record_video)
        cloudflare_challenge_solver_record_har_mock.return_value = get_value(record_har)
        cloudflare_challenge_solver_keep_records_mock.return_value = get_keep_records(keep_records)
        settings_manager = SettingsManager()
        settings_cloudflare_challenge_solver = SettingsCloudflareChallengeSolver(settings_manager)
        self.api.add_route('/api/settings/cloudflare-challenge-solver', settings_cloudflare_challenge_solver)
        p = dict()
        if debug is not None:
            p['debug'] = debug
        if record_video is not None:
            p['record_video'] = record_video
        if record_har is not None:
            p['record_har'] = record_har
        if keep_records is not None:
            p['keep_records'] = keep_records
        self.simulate_request("/api/settings/cloudflare-challenge-solver", method='PATCH',
                              body=json.dumps(p), decode='utf-8')
        self.assertEqual(self.srmock.status, falcon.HTTP_NO_CONTENT)
        def assert_calls(value, mock):
            if value is not None:
                mock.assert_has_calls([call()])
                if revert:
                    mock.assert_has_calls([call(value)])
            else:
                mock.assert_not_called()
        assert_calls(debug, cloudflare_challenge_solver_debug_mock)
        assert_calls(record_video, cloudflare_challenge_solver_record_video_mock)
        assert_calls(record_har, cloudflare_challenge_solver_record_har_mock)
        assert_calls(keep_records, cloudflare_challenge_solver_keep_records_mock)