Fixed almost all tests, just one left

Some python not expected behavior influenced the tests, specially one bug with pycurl which took a lot of time