Example #1
0
 def test_ClassQuery_options(self):
     cid = '1234567890'
     expectedOptions = ''
     aq = ClassQuery('fvTenant')
     aq.id = cid
     expectedOptions += '_dc=' + cid
     assert aq.options == expectedOptions
Example #2
0
 def test_ClassQuery_options(self):
     cid = '1234567890'
     expectedOptions = ''
     aq = ClassQuery('fvTenant')
     aq.id = cid
     expectedOptions += '_dc=' + cid
     assert aq.options == expectedOptions
Example #3
0
 def test_ClassQuery_getUrl(self, sessionUrl, dc, requestType):
     session = LoginSession(sessionUrl, 'admin', 'password',
                            requestFormat=requestType)
     klass = 'fvTenant'
     cq = ClassQuery(klass)
     expected = sessionUrl + '/api/class/' + klass + '.' + requestType
     cq.id = dc
     expected += '?_dc=' + dc
     assert cq.getUrl(session) == expected
Example #4
0
 def test_ClassQuery_getUrl(self, sessionUrl, dc, requestType):
     session = LoginSession(sessionUrl, 'admin', 'password',
                            requestFormat=requestType)
     klass = 'fvTenant'
     cq = ClassQuery(klass)
     expected = sessionUrl + '/api/class/' + klass + '.' + requestType
     cq.id = dc
     expected += '?_dc=' + dc
     assert cq.getUrl(session) == expected