def testInvalidCodeNumber(self): """Test that an index out of range is handled""" with self.assertRaises(LookupException): cqi = CyberQInterface("127.0.0.1") cqi._lookup("temperature", 4)
def testBadTableName(self): """Test that an unknown table produces a known exception""" with self.assertRaises(LookupException): cqi = CyberQInterface("127.0.0.1") cqi._lookup("badtable", 0)