'Test extend_*_dict won\'t crash if port_security item is None.'

def _test_extend_dict_no_port_security(self, func):

    for db_data in ({'port_security': None, 'name': 'net1'}, {}):
        response_data = {}
        session = mock.Mock()
        driver = port_security.PortSecurityExtensionDriver()
        getattr(driver, func)(session, db_data, response_data)
        self.assertTrue(response_data[psec.PORTSECURITY])
