@@ -0,0 +1,1868 @@
+# Copyright 2014, 2015 Red Hat%0A#%0A# Authors: Chris Dent %3Cchdent@redhat.com%3E%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A# not use this file except in compliance with the License. You may obtain%0A# a copy of the License at%0A#%0A#      http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A# License for the specific language governing permissions and limitations%0A# under the License.%0A%22%22%22Handlers for process the body of a response in various ways.%0A%0AA response handler is a callable that takes a test case (which includes%0Aa reference to the response body). It should look for matching rules in%0Athe test data and simply return if none are there. If there are some,%0Athey should be tested.%0A%22%22%22%0A%0A%0Adef handle_response_strings(test):%0A    %22%22%22Compare strings in response body.%22%22%22%0A    for expected in test.test_data%5B'response_strings'%5D:%0A        expected = test.replace_template(expected)%0A        test.assertIn(expected, test.output)%0A%0A%0Adef handle_json_paths(test):%0A    %22%22%22Test json_paths against json data.%22%22%22%0A    # NOTE: This process has some advantages over other process that%0A    # might come along because the JSON data has already been%0A    # processed (to provided for the magic template replacing).%0A    # Other handlers that want access to data structures will need%0A    # to do their own processing.%0A    for path in test.test_data%5B'response_json_paths'%5D:%0A        match = test.extract_json_path_value(test.json_data, path)%0A        expected = test.replace_template(%0A            test.test_data%5B'response_json_paths'%5D%5Bpath%5D)%0A        test.assertEqual(expected, match, 'Unable to match %25s as %25s'%0A                         %25 (path, expected))%0A

add missing critical handlers file