fix errors that were uncovered during testing in thin python client

Signed-off-by: Sietse van der Molen <sietse@vdmolen.eu>
Merge branch 'MVP-1556'
make tests more integrated

Signed-off-by: Sietse van der Molen <sietse@vdmolen.eu>
Merge pull request #12 from mcash/MVP-1585

Mvp 1585