Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #5
0
 def test_ConfigRequest_removeMo_raises(self):
     fvTenant = Tenant('uni', 'testing')
     cr = ConfigRequest()
     with pytest.raises(KeyError):
         cr.removeMo(fvTenant)
Beispiel #6
0
 def test_ConfigRequest_removeMo_raises(self):
     fvTenant = Tenant('uni', 'testing')
     cr = ConfigRequest()
     with pytest.raises(KeyError):
         cr.removeMo(fvTenant)