class TestDeviceManager(TestCase):

    instructions = (ObjectID(), )

    def setUp(self):
        self.manager = DeviceManager()
        super(TestDeviceManager, self).setUp()

    def test_custom_registry(self):
        obj = object()
        d = {'1.3.6.1.4.1.8072.3.2.10': obj}
        registry = MagicMock(spec_set=dict)
        registry.__getitem__.side_effect = lambda key: d[key]
        cls = self.manager.get_class(host=self.test_host, port=self.test_port,
                                     registry=registry)
        self.assertTrue(obj is cls)
 def setUp(self):
     self.manager = DeviceManager()
     super(TestDeviceManager, self).setUp()