Skip to content

Commit e830c52

Browse files
author
matthias_schaub
committed
Test for connection to firebase with a push.
1 parent 4dd19c0 commit e830c52

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mapswipe_workers/tests/unittests/test_firebase_connection.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import unittest
22

3+
from firebase_admin.exceptions import FirebaseError
4+
35
from mapswipe_workers import auth
46

57

@@ -12,8 +14,10 @@ def tearDown(self):
1214

1315
def test_connection(self):
1416
ref = self.fb_db.reference("/v2")
15-
result = ref.get(shallow=True)
16-
self.assertIsNotNone(result)
17+
try:
18+
ref.push("test_connection")
19+
except FirebaseError as error:
20+
self.fail(error)
1721

1822

1923
if __name__ == "__main__":

0 commit comments

Comments
 (0)