class_docstr: Test class to test ThreatStream functionalities
class_docstr_tok: ["Test","class","to","test","ThreatStream","functionalities"]
docstr: ThreatStream - Connection to ThreatStream.com, with Continuation
docstr_tok: ["ThreatStream","-","Connection","to","ThreatStream.com",",","with","Continuation"]
code: def test_connect_with_next(self, get_mock, finalize_mock):
      """ThreatStream - Connection to ThreatStream.com, with Continuation"""
      next_url = "this_url"
      get_mock.return_value.json.return_value = self._get_http_response(
          next_url
      )
      get_mock.return_value.status_code = 200
      self.threatstream._config["ioc_filters"] = {"test_source"}
      self.threatstream._connect("previous_url")
      expected_intel = [
          {
              "value": "malicious_domain2.com",
              "itype": "c2_domain",
              "source": "test_source",
              "type": "domain",
              "expiration_ts": 1512000062,
          }
      ]
      finalize_mock.assert_called_with(expected_intel, next_url)
  
imports: from datetime import datetime
  import os
  import boto3
  from botocore.exceptions import ClientError
  from mock import Mock, patch
  from moto import mock_ssm
  from nose.tools import assert_equal, raises
  from streamalert.shared.config import load_config
  from streamalert.threat_intel_downloader.exceptions import ThreatStreamCredsError, ThreatStreamLambdaInvokeError, ThreatStreamRequestsError
  from streamalert.threat_intel_downloader.main import ThreatStream
  from tests.unit.streamalert.apps.test_helpers import MockLambdaClient
  from tests.unit.streamalert.shared.test_config import get_mock_lambda_context
  from tests.unit.streamalert.threat_intel_downloader.test_helpers import put_mock_params
label_desc: Use image node_id 21 for calling the TestThreatStream obj's underlying member method code with example usage: obj.test_connect_with_next(get_mock, finalize_mock) without return types