code: def test_new_manager(constructor_spy):
      """StreamQuery - QueryPacksManagerFactory - new_manager"""
      context = MagicMock(name="MockedExecutionContext")
      factory = QueryPacksManagerFactory(context)
  
      instance = MagicMock(name="MockedManager")
      constructor_spy.return_value = instance
  
      assert_equals(factory.new_manager(), instance)
  
      constructor_spy.assert_called_with(context)
  
imports: from datetime import datetime, timezone
  from mock import MagicMock, patch
  from nose.tools import assert_equals, assert_false, assert_true
  from streamalert.scheduled_queries.query_packs.manager import QueryPack, QueryPacksManager, QueryPackExecutionContext, QueryPacksManagerFactory
  from streamalert.scheduled_queries.query_packs.parameters import QueryParameterGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: test_new_manager(constructor_spy) without return types