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