def test_init(self, m_get_project_driver, m_upgrade_crds):
        project_driver = mock.sentinel.project_driver
        m_get_project_driver.return_value = project_driver

        handler = namespace.NamespaceHandler()
        self.assertEqual(project_driver, handler._drv_project)
        m_upgrade_crds.assert_called_once()
Ejemplo n.º 2
0
    def test_init(self, m_get_project_driver, m_get_subnets_driver,
                  m_get_sg_driver, m_get_vif_pool_driver):
        project_driver = mock.sentinel.project_driver
        subnets_driver = mock.sentinel.subnets_driver
        sg_driver = mock.sentinel.sg_driver
        vif_pool_driver = mock.Mock(spec=vif_pool.MultiVIFPool)

        m_get_project_driver.return_value = project_driver
        m_get_subnets_driver.return_value = subnets_driver
        m_get_sg_driver.return_value = sg_driver
        m_get_vif_pool_driver.return_value = vif_pool_driver

        handler = namespace.NamespaceHandler()

        self.assertEqual(project_driver, handler._drv_project)
        self.assertEqual(subnets_driver, handler._drv_subnets)
        self.assertEqual(sg_driver, handler._drv_sg)
        self.assertEqual(vif_pool_driver, handler._drv_vif_pool)
Ejemplo n.º 3
0
    def test_init(self, m_get_project_driver):
        project_driver = mock.sentinel.project_driver
        m_get_project_driver.return_value = project_driver

        handler = namespace.NamespaceHandler()
        self.assertEqual(project_driver, handler._drv_project)