Probably we could use:

with self.assertRaises(HTTPServiceError) as e:
...

here.