Esempio n. 1
0
 def test_ClassQuery_options(self):
     cid = '1234567890'
     expectedOptions = ''
     aq = ClassQuery('fvTenant')
     aq.id = cid
     expectedOptions += '_dc=' + cid
     assert aq.options == expectedOptions
Esempio n. 2
0
 def test_ClassQuery_options(self):
     cid = '1234567890'
     expectedOptions = ''
     aq = ClassQuery('fvTenant')
     aq.id = cid
     expectedOptions += '_dc=' + cid
     assert aq.options == expectedOptions
Esempio n. 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
Esempio n. 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