Inside your datasource class have a method that gets you the HttpSocket:
public function getHttpSocket() {
return new HttpSocket();
}
You can then mock that method of your data source and return a completely mocked HttpSocket object and set your expectations and return values as needed.