Esempio n. 1
0
 def test_ConfigRequest_removeMo_no_configMos_left(self):
     fvTenant = Tenant('uni', 'testing')
     fvnsVlanInstP = VlanInstP('uni/infra', 'namespace1', 'dynamic')
     cr = ConfigRequest()
     cr.addMo(fvTenant)
     cr.removeMo(fvTenant)
     assert not cr.hasMo(fvTenant.dn)
Esempio n. 2
0
 def test_ConfigRequest_removeMo_no_configMos_left(self):
     fvTenant = Tenant('uni', 'testing')
     fvnsVlanInstP = VlanInstP('uni/infra', 'namespace1', 'dynamic')
     cr = ConfigRequest()
     cr.addMo(fvTenant)
     cr.removeMo(fvTenant)
     assert not cr.hasMo(fvTenant.dn)
Esempio n. 3
0
 def test_ConfigRequest_removeMo_and_hasMo_positive(self):
     fvTenant = Tenant('uni', 'testing')
     fvnsVlanInstP = VlanInstP('uni/infra', 'namespace1', 'dynamic')
     cr = ConfigRequest()
     cr.addMo(fvTenant)
     cr.removeMo(fvTenant)
     cr.addMo(fvnsVlanInstP)
     assert cr.hasMo(fvnsVlanInstP.dn)
Esempio n. 4
0
 def test_ConfigRequest_removeMo_and_hasMo_positive(self):
     fvTenant = Tenant('uni', 'testing')
     fvnsVlanInstP = VlanInstP('uni/infra', 'namespace1', 'dynamic')
     cr = ConfigRequest()
     cr.addMo(fvTenant)
     cr.removeMo(fvTenant)
     cr.addMo(fvnsVlanInstP)
     assert cr.hasMo(fvnsVlanInstP.dn)
Esempio n. 5
0
 def test_ConfigRequest_removeMo_raises(self):
     fvTenant = Tenant('uni', 'testing')
     cr = ConfigRequest()
     with pytest.raises(KeyError):
         cr.removeMo(fvTenant)
Esempio n. 6
0
 def test_ConfigRequest_removeMo_raises(self):
     fvTenant = Tenant('uni', 'testing')
     cr = ConfigRequest()
     with pytest.raises(KeyError):
         cr.removeMo(fvTenant)