[TASK] Refactor trustline test code

Refactor trustline test code to reduce duplication and check response body before status code and headers
Trying to keep things DRY (don't repeat yourself). You can argue for WET (write every time), but generally I think things get a lot harder to read and maintain when there is a lot of copy-paste type duplication.