def testMinionContextSetup(self):
        console.terse("{0}\n".format(self.testMinionContextSetup.__doc__))

        act = self.addEnterDeed("TestOptsSetupMinion")
        self.assertIn(act, self.frame.enacts)
        self.assertEqual(act.actor, "TestOptsSetupMinion")
        act = self.addEnterDeed("SaltRaetManorLaneSetup")
        self.assertIn(act, self.frame.enacts)
        self.assertEqual(act.actor, "SaltRaetManorLaneSetup")
        act = self.addEnterDeed("SaltRaetRoadStackSetup")
        self.assertIn(act, self.frame.enacts)
        self.assertEqual(act.actor, "SaltRaetRoadStackSetup")
        act = self.addEnterDeed("StatsMinionTestSetup")
        self.assertIn(act, self.frame.enacts)
        self.assertEqual(act.actor, "StatsMinionTestSetup")

        act = self.addRecurDeed("SaltRaetStatsEventer")
        self.assertIn(act, self.frame.reacts)
        self.assertEqual(act.actor, "SaltRaetStatsEventer")

        self.resolve()  # resolve House, Framer, Frame, Acts, Actors

        self.frame.enter()
        self.assertDictEqual(act.actor.Ioinits,
                             {'opts': '.salt.opts',
                              'stats_req': '.salt.stats.event_req',
                              'lane_stack': '.salt.lane.manor.stack',
                              'road_stack': '.salt.road.manor.stack'})

        self.assertTrue(hasattr(act.actor, 'opts'))
        self.assertTrue(hasattr(act.actor, 'stats_req'))
        self.assertTrue(hasattr(act.actor, 'lane_stack'))
        self.assertTrue(hasattr(act.actor, 'road_stack'))
        self.assertIsInstance(act.actor.lane_stack.value, LaneStack)
        self.assertIsInstance(act.actor.road_stack.value, RoadStack)
        self.frame.recur()

        # Close active stacks servers
        act.actor.lane_stack.value.server.close()
        testStack = self.store.fetch('.salt.test.road.stack')
        if testStack:
            testStack.value.server.close()
        act.actor.road_stack.value.server.close()
Test the context setup procedure used in all the consequence tests works as expected
dataset/ETHPy150Open saltstack/salt/salt/daemons/test/test_stats.py/StatsEventerTestCase.testMinionContextSetup