check data and headers in expect_urlopen, handle URLError in urlread