Use opener instead of httpretty module

httpretty does not work in PY3, so I use opener in urllib instead of httpretty.