'test connection kwargs type checks throw errors for bad input'

def test_bad_type_connection_parameters(self):

    kwargs = {'host': 'https://www.test.com', 'port': 5678, 'virtual_host': 'vvhost', 'channel_max': 3, 'frame_max': 40000, 'heartbeat': 7, 'backpressure_detection': False, 'ssl': True, 'blocked_connection_timeout': 10.5}
    for (bad_field, bad_value) in (('host', 15672), ('port', '5672'), ('virtual_host', True), ('channel_max', '4'), ('frame_max', '5'), ('credentials', 'bad'), ('locale', 1), ('heartbeat', '6'), ('socket_timeout', '42'), ('retry_delay', 'two'), ('backpressure_detection', 'true'), ('ssl', {'ssl': 'dict'}), ('ssl_options', True), ('connection_attempts', 'hello'), ('blocked_connection_timeout', set())):
        bkwargs = copy.deepcopy(kwargs)
        bkwargs[bad_field] = bad_value
        self.assertRaises(TypeError, connection.ConnectionParameters, **bkwargs)
