File: test_textinput.py

package info (click to toggle)
python-gassist-text 0.0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 172 kB
  • sloc: python: 268; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Tests for TextAssistant."""

import google.oauth2.credentials
import grpc
import pytest

from gassist_text import TextAssistant


def test_textinput():
    """Test assist call raises if no credentials."""
    credentials = google.oauth2.credentials.Credentials(token=None)
    with TextAssistant(credentials) as assistant, pytest.raises(
        grpc._channel._MultiThreadedRendezvous
    ):
        assistant.assist("tell me a joke")