Skip to content

Commit

Permalink
fix: added client test without any database set
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwarajanand committed Jul 13, 2023
1 parent 8026395 commit 34b9da6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/v1/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ def test_client_constructor_defaults(database, expected):
assert client._client_info is _CLIENT_INFO


def test_client_constructor_without_db():
from google.cloud.firestore_v1.client import _CLIENT_INFO

credentials = _make_credentials()
client = _make_client(project=PROJECT, credentials=credentials)
assert client.project == PROJECT
assert client._credentials == credentials
assert client._database == DEFAULT_DATABASE
assert client._client_info is _CLIENT_INFO


@pytest.mark.parametrize(
"database, expected",
[
Expand Down

0 comments on commit 34b9da6

Please sign in to comment.