Hello everyone, I would like to test my code that call the xero api server and to do that I want create mocked response to test different scenarios.
At the moment I want test just few endpoints, my Idea is to create a class as a container of the items needed to render.
The items are generated by a class that use a "stamp" of the returned json and add or modify the stamp using the given kwargs.
What you think about the example above? Maybe you have better idea?
e.g.
response = MockedXeroResponse()
invoice = fakeInvoice(**kwargs) # kwargs add fields
another_invoice = fakeInvoice(**{'Amount':1000})
response.add(invoice, another_invoice) #
response.json # return the json response as the XERO api with the two invoices.
--