

def testContextSetup(self):
    '\n        Test the context setup procedure used in all the consequence tests works as expected\n        This test intended to avoid some checks in other tests\n        '
    console.terse('{0}\n'.format(self.testContextSetup.__doc__))
    act = self.addEnterDeed('TestOptsSetupMaster')
    self.assertIn(act, self.frame.enacts)
    self.assertEqual(act.actor, 'TestOptsSetupMaster')
    act = self.addEnterDeed('SaltRaetManorLaneSetup')
    self.assertIn(act, self.frame.enacts)
    self.assertEqual(act.actor, 'SaltRaetManorLaneSetup')
    act = self.addEnterDeed('PresenterTestSetup')
    self.assertIn(act, self.frame.enacts)
    self.assertEqual(act.actor, 'PresenterTestSetup')
    act = self.addRecurDeed('SaltRaetPresenter')
    self.assertIn(act, self.frame.reacts)
    self.assertEqual(act.actor, 'SaltRaetPresenter')
    self.resolve()
    self.frame.enter()
    self.assertDictEqual(act.actor.Ioinits, {
        'opts': '.salt.opts',
        'presence_req': '.salt.presence.event_req',
        'lane_stack': '.salt.lane.manor.stack',
        'alloweds': '.salt.var.presence.alloweds',
        'aliveds': '.salt.var.presence.aliveds',
        'reapeds': '.salt.var.presence.reapeds',
        'availables': '.salt.var.presence.availables',
    })
    self.assertTrue(hasattr(act.actor, 'opts'))
    self.assertTrue(hasattr(act.actor, 'presence_req'))
    self.assertTrue(hasattr(act.actor, 'lane_stack'))
    self.assertTrue(hasattr(act.actor, 'alloweds'))
    self.assertTrue(hasattr(act.actor, 'aliveds'))
    self.assertTrue(hasattr(act.actor, 'reapeds'))
    self.assertTrue(hasattr(act.actor, 'availables'))
    testStack.assertIsInstance(act.actor.lane_stack.value, LaneStack)
    self.frame.recur()
    act.actor.lane_stack.value.server.close()
    testStack = self.store.fetch('.salt.test.lane.stack')
    if testStack:
        testStack.value.server.close()

dataset/ETHPy150Open saltstack/salt/salt/daemons/test/test_presence.py PresenterTestCase.testContextSetup/VarMisuse@322/591 `self`->`testStack`