Exemplo n.º 1
0
    def test_provide_charm_instance_as_context_manager(self):
        self.patch_object(chm_core, 'BaseOpenStackCharm', name='charm')
        self.charm.singleton = 'the-charm'

        with chm_core.provide_charm_instance() as charm:
            self.assertEqual(charm, 'the-charm')
Exemplo n.º 2
0
    def test_provide_charm_instance_as_context_manager(self):
        self.patch_object(chm_core, 'BaseOpenStackCharm', name='charm')
        self.charm.singleton = 'the-charm'

        with chm_core.provide_charm_instance() as charm:
            self.assertEqual(charm, 'the-charm')