Relax very strict test and fix the expected status codes for bad request tests

Now bad request tests accept 4xx.