示例#1
0
    async def test_auth_process_captcha_without(self):
        s = ImplicitSession(login='******', password='******', app_id='123')
        s.REQUEST_URL = 'https://{}/method/'.format(self.base_url)
        s.AUTH_URL = 'https://{}/authorize'.format(self.base_url)

        await s.authorize()
        await s.close()
示例#2
0
    async def test_auth_with_empty_data(self):
        s = ImplicitSession(login='', password='', app_id='')
        s.REQUEST_URL = 'https://{}/method/'.format(self.base_url)
        s.AUTH_URL = 'https://{}/authorize'.format(self.base_url)

        with self.assertRaises(VkAuthError):
            await s.authorize()
        await s.close()
示例#3
0
async def test_implicit_session_auth_process_captcha_without(vk_server):
    url = f'http://{vk_server.host}:{vk_server.port}'
    s = ImplicitSession(login='******', password='******', app_id='123')
    s.REQUEST_URL = f'{url}/method/'
    s.AUTH_URL = f'{url}/authorize'

    await s.authorize()
    await s.close()
示例#4
0
async def test_implicit_session_auth_with_empty_data(vk_server):
    url = f'http://{vk_server.host}:{vk_server.port}'
    s = ImplicitSession(login='', password='', app_id='')
    s.REQUEST_URL = f'{url}/method/'
    s.AUTH_URL = f'{url}/authorize'

    with pytest.raises(VkAuthError):
        await s.authorize()
    await s.close()