class_docstr: Test class for PhantomOutput
class_docstr_tok: ["Test","class","for","PhantomOutput"]
docstr: PhantomOutput - Container Query URL
docstr_tok: ["PhantomOutput","-","Container","Query","URL"]
code: def test_dispatch_container_query(self, post_mock, get_mock):
      """PhantomOutput - Container Query URL"""
      rule_description = "Info about this rule and what actions to take"
      headers = {"ph-auth-token": "mocked_auth_token"}
      # NOTE(bobby): Is this supposed to require failing status codes?
      get_mock.return_value.status_code = 404
      post_mock.return_value.status_code = 404
      assert_false(
          PhantomOutput._setup_container(
              "rule_name", rule_description, self.CREDS["url"], headers
          )
      )
  
      full_url = "{}/rest/container".format(self.CREDS["url"])
      params = {"_filter_name": '"rule_name"', "page_size": 1}
      get_mock.assert_has_calls(
          [call(full_url, params, headers, False)]
      )
      ph_container = {
          "name": "rule_name",
          "description": rule_description,
      }
      post_mock.assert_has_calls(
          [call(full_url, ph_container, headers, False)]
      )
  
file_path: streamalert/tests/unit/streamalert/alert_processor/outputs/test_phantom.py
imports: from mock import call, patch, PropertyMock, Mock, MagicMock
  from nose.tools import assert_false, assert_true
  from streamalert.alert_processor.outputs.phantom import PhantomOutput
  from tests.unit.streamalert.alert_processor.helpers import get_alert
label_desc: Use image node_id 10 for calling the TestPhantomOutput obj's underlying member method code with example usage: obj.test_dispatch_container_query(post_mock, get_mock) without return types