human
Complete the below
@patch('aioautomatic.Client.create_session_from_password')
def test_invalid_credentials(mock_create_session, hass):

    ''''Test with invalid credentials.'
    '''

=====
Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    @asyncio.coroutine
    def get_session(*args, **kwargs):
        'Return    the    test    session.'
        raise aioautomatic.exceptions.ForbiddenError()
    mock_create_session.side_effect = get_session
    config = {'platform': 'automatic', 'username': 'bad_username', 'password': 'bad_password', 'client_id': 'client_id', 'secret': 'client_secret', 'devices': None}
    result = hass.loop.run_until_complete(async_setup_scanner(hass, config, None))
    assert (not result)