Fix rest_client's expected_success for non int status

rest_client's expected_success() method expect expected_code
and read_code as int and compare both.

But if read_code is non int then this method will not compare anything
and pass falsely.

condition "if read_code < 400:" makes comparision of both status code but
return the results. But if read_code is not int then this condition is
alse and it make this method pass wihtout any compariosion.

It is written in doc string that read_code should be int but if anyone try
to send non int then it might be false pass.

self.expected_success(200, '202') - pass. This is false pass.

read_code is usually a status code return from API which can be fetched as
string via dict element like resp['status'].

Some user tried to access that and faced the issue, one example of this
wrong usage is:
If01461617020f39b4da554b127e7b5e5fd704645

Change-Id: I3f4c58bdbb172805514831103927d3464d65d7f3
Closes-Bug: #1571443
2 files changed