예제 #1
0
    def test_constructor(self):
        with nested(
                patch('org.o3project.odenos.core.component.component.'
                      'Component._set_super_type'),
                patch('org.o3project.odenos.core.component.component.'
                      'Component._reset_event_subscription')) as (
                          m_set_super_type, m_reset_event):

            self.result = Component(self.Object_id, self.Dispatcher)
            self.assertEqual(self.result.dispatcher, self.Dispatcher)
            self.assertEqual(self.result.object_id, self.Object_id)
            self.assertEqual(m_set_super_type.call_count, 1)
            self.assertEqual(m_reset_event.call_count, 1)
예제 #2
0
 def setUp(self):
     self.target = Component(self.Object_id, self.Dispatcher)