def testBadHost(self):
        badHost = "badhostname"
        with self.assertRaises(tdrest.InterfaceError) as cm:
            tdrest.connect(
                host=badHost, system=system, username=self.username,
                password=self.password)
        self.assertEqual(cm.exception.code, tdrest.REST_ERROR)
        self.assertTrue(badHost in cm.exception.msg,
                        '{} not found in "{}"'.format(
                            badHost, cm.exception.msg))
dataset/ETHPy150Open Teradata/PyTd/test/test_tdrest.py/TdRestTest.testBadHost/original