Skip to content

Commit 258e4ba

Browse files
authored
Fixing some integration test failures (#250)
* Fixing some integration test failures * Removed unused imports * Updated comment
1 parent 241f887 commit 258e4ba

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

firebase_admin/_messaging_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ class WebpushConfig(object):
150150
data: A dictionary of data fields (optional). All keys and values in the dictionary must be
151151
strings. When specified, overrides any data fields set via ``Message.data``.
152152
notification: A ``messaging.WebpushNotification`` to be included in the message (optional).
153-
fcm_options: A ``messaging.WebpushFcmOptions`` to be included in the messsage (optional).
153+
fcm_options: A ``messaging.WebpushFcmOptions`` instance to be included in the messsage
154+
(optional).
154155
155156
.. _Webpush Specification: https://tools.ietf.org/html/rfc8030#section-5
156157
"""

integration/test_db.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def testdata():
4242
return json.load(dino_file)
4343

4444
@pytest.fixture(scope='module')
45-
def testref(update_rules):
45+
def testref(update_rules, testdata):
4646
"""Adds the necessary DB indices, and sets the initial values.
4747
4848
This fixture is attached to the module scope, and therefore is guaranteed to run only once
@@ -53,7 +53,7 @@ def testref(update_rules):
5353
"""
5454
del update_rules
5555
ref = db.reference('_adminsdk/python/dinodb')
56-
ref.set(testdata())
56+
ref.set(testdata)
5757
return ref
5858

5959

integration/test_firestore.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
"""Integration tests for firebase_admin.firestore module."""
1616
import datetime
17-
import pytest
18-
19-
from google.cloud import exceptions # pylint: disable=import-error,no-name-in-module
2017

2118
from firebase_admin import firestore
2219

@@ -36,8 +33,7 @@ def test_firestore():
3633
assert data == expected
3734

3835
doc.delete()
39-
with pytest.raises(exceptions.NotFound):
40-
doc.get()
36+
assert doc.get().exists is False
4137

4238
def test_server_timestamp():
4339
client = firestore.client()

0 commit comments

Comments
 (0)