{"body":"# Copyright 2016 Intel\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport syntribos.signal\n\n\ndef has_string(test):\n    \"\"\"checks if the reponse consists of any failure strings\n\n    :returns: syntribos.signal.SynSignal\n    \"\"\"\n\n    data = {\n        \"req\": test.test_resp.request,\n        \"resp\": test.test_resp,\n        \"failure_strings\":[]\n    }\n\n    failure_keys = test.failure_keys\n    for key in failure_keys:\n        if key in test.test_resp.content:\n            data[\"failure_strings\"].append(key)\n\n    text = \"Failure strings present\"\n    slug = \"FAILURE_KEYS_PRESENT\"\n    return syntribos.signal.SynSignal(text=text, slug=slug, data=data,\n                                      strength=1.0)\n","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/DB4FlWKj","modified":1469205164,"id":"DB4FlWKj","size":1200,"lines":38,"own_paste":false,"theme":"","date":1469205164}