def test_TraceQuery_options(self): tid = '1234567890' klass = 'fvTenant' tq = TraceQuery('uni', 'fvTenant') expectedOptions = 'target-class=' + klass tq.id = tid expectedOptions += '&_dc=' + tid assert tq.options == expectedOptions
def test_TraceQuery_getUrl(self, sessionUrl, dc, requestType): session = LoginSession(sessionUrl, 'admin', 'password', requestFormat=requestType) dnStr = 'uni' klass = 'fvTenant' cq = TraceQuery(dnStr, klass) expected = sessionUrl + '/api/trace/' + dnStr + '.' + requestType expected += '?target-class=' + klass cq.id = dc expected += '&_dc=' + dc assert cq.getUrl(session) == expected