Write tests for module robottelo.api.client

Make tests for all untested code in target module. Fix a bug which was found
while writing tests.