I\'m trying to create a set of Unit Tests to test the Google Client Library for Bigquery. I\'m struggling to make a Unittest file which will mock the client and will let me test
I also find it hard to get around the authentication part and only mock interacting with methods, so I ended up just mocked the whole library. :facepalm:
import sys
from unittest.mock import MagicMock
sys.modules["google.cloud.storage"] = MagicMock()
from your_application import make_app
def test_make_app():
make_app()