From fb0413c1fb2567c8ec15072049332007fe7d8a57 Mon Sep 17 00:00:00 2001 From: Eyal Ben Ivri Date: Tue, 30 Jul 2024 12:03:29 +0200 Subject: [PATCH] trying to mock firestore client --- tests/conftest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 735926d..bcdb363 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,14 +2,13 @@ from flask import Flask from flask.testing import FlaskClient, FlaskCliRunner from google.cloud import firestore -from main import app as main_app @pytest.fixture() def app(mocker) -> Flask: + mocker.patch.object(firestore, "Client") - mocker.patch.object(firestore.Client, "__init__") - + from main import app as main_app app = main_app app.config.update({ "TESTING": True,