def test_AbstractRequest_getUriPathAndOptions(self, sessionUrl, dc, uriBase, requestType): expected = '.' + requestType session = LoginSession(sessionUrl, 'admin', 'password', requestFormat=requestType) ar = AbstractRequest() if dc is not None: ar.id = dc expected += '?_dc=' + dc if uriBase is None: uriBase = '' ar.uriBase = uriBase expected = uriBase + expected assert ar.getUriPathAndOptions(session) == expected
def test_AbstractRequest_makeOptions(self, optionsDict, expected1, expected2): options = AbstractRequest.makeOptions(optionsDict) assert (options == expected1 or options == expected2)
def test_AbstractRequest_options_property(self, value, expected): ar = AbstractRequest() ar.id = value assert ar.options == expected
def test_AbstractRequest_individual_properties(self, prop, value): ar = AbstractRequest() setattr(ar, prop, value) assert getattr(ar, prop) == value
def test_AbstractRequest_init(self): assert isinstance(AbstractRequest(), AbstractRequest)