def create_StackMachineModule_with_start_module_and_data(start_module, init_data=None): obj = StackMachineModule() obj.internal_init(Scope("Test.Module"), EventFrameworkMock()) data = {} obj.start(data) obj.set_start_module(start_module, init_data) return obj, data
def test_internal_init(self): obj = StackMachineModule() event_framework = EventFrameworkMock() obj.internal_init(Scope("Test.Module"),event_framework) self.assertEquals(type(obj.debug) , Scope) self.assertEquals(obj.debug.get_name(), "Test.Module.StackMachine") self.assertEquals(len(obj.get_stack()), 0) self.assertEquals(event_framework, obj._event_framework)