def testc_find_ofc_item(self):
        """test find OFC item."""
        o, q, n = self.get_ofc_item_random_params()
        ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
        tenant = ndb.find_ofc_item(self.session, 'ofc_tenant', o)
        self.assertEqual(tenant.ofc_id, o)
        self.assertEqual(tenant.quantum_id, q)

        tenant_none = ndb.find_ofc_item(self.session, 'ofc_tenant', n)
        self.assertEqual(None, tenant_none)
Exemple #2
0
    def testc_find_ofc_item(self):
        """test find OFC item."""
        o, q, n = self.get_ofc_item_random_params()
        ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
        tenant = ndb.find_ofc_item(self.session, 'ofc_tenant', o)
        self.assertEqual(tenant.ofc_id, o)
        self.assertEqual(tenant.quantum_id, q)

        tenant_none = ndb.find_ofc_item(self.session, 'ofc_tenant', n)
        self.assertEqual(None, tenant_none)
Exemple #3
0
    def test_del_ofc_item(self):
        o, q, n = self.get_ofc_item_random_params()
        ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
        self.assertTrue(ndb.del_ofc_item(self.session, 'ofc_tenant', q))

        self.assertIsNone(ndb.get_ofc_item(self.session, 'ofc_tenant', q))
        self.assertIsNone(ndb.find_ofc_item(self.session, 'ofc_tenant', o))
Exemple #4
0
    def test_del_ofc_item(self):
        o, q, n = self.get_ofc_item_random_params()
        ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
        self.assertTrue(ndb.del_ofc_item(self.session, 'ofc_tenant', q))

        self.assertIsNone(ndb.get_ofc_item(self.session, 'ofc_tenant', q))
        self.assertIsNone(ndb.find_ofc_item(self.session, 'ofc_tenant', o))
Exemple #5
0
    def testc_del_ofc_item(self):
        """test delete OFC item."""
        o, q, n = self.get_ofc_item_random_params()
        ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
        ndb.del_ofc_item(self.session, 'ofc_tenant', q)

        tenant_none = ndb.get_ofc_item(self.session, 'ofc_tenant', q)
        self.assertEqual(None, tenant_none)
        tenant_none = ndb.find_ofc_item(self.session, 'ofc_tenant', o)
        self.assertEqual(None, tenant_none)
    def testc_del_ofc_item(self):
        """test delete OFC item."""
        o, q, n = self.get_ofc_item_random_params()
        ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
        ndb.del_ofc_item(self.session, 'ofc_tenant', q)

        tenant_none = ndb.get_ofc_item(self.session,
                                       'ofc_tenant', q)
        self.assertEqual(None, tenant_none)
        tenant_none = ndb.find_ofc_item(self.session,
                                        'ofc_tenant', o)
        self.assertEqual(None, tenant_none)
Exemple #7
0
 def test_find_ofc_item_for_nonexisting_entry(self):
     self.assertIsNone(
         ndb.find_ofc_item(self.session, 'ofc_tenant', 'non-existi-id'))
Exemple #8
0
 def test_find_ofc_item(self):
     o, q, n = self.get_ofc_item_random_params()
     ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
     tenant = ndb.find_ofc_item(self.session, 'ofc_tenant', o)
     self.assertEqual(tenant.ofc_id, o)
     self.assertEqual(tenant.quantum_id, q)
Exemple #9
0
 def test_find_ofc_item_for_nonexisting_entry(self):
     self.assertIsNone(
         ndb.find_ofc_item(self.session, 'ofc_tenant', 'non-existi-id'))
Exemple #10
0
 def test_find_ofc_item(self):
     o, q, n = self.get_ofc_item_random_params()
     ndb.add_ofc_item(self.session, 'ofc_tenant', q, o)
     tenant = ndb.find_ofc_item(self.session, 'ofc_tenant', o)
     self.assertEqual(tenant.ofc_id, o)
     self.assertEqual(tenant.neutron_id, q)