Better handling for when an interface is not defined.

Moved the https call out for easier use with mock.
Removed pytest dependancy.
Why not just add this onto the `TestCase` class and access `self.assertRaises` like normal.

Also, probably nice to cite where these are coming from for future reference since I don't think you wrote this from scratch. ;)