Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 0cd85da

Browse files
wkiserliyanhui1228
authored andcommitted
Mock out stackdriver client in test case (#170)
1 parent fbbe9c5 commit 0cd85da

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/unit/trace/ext/flask/test_flask_middleware.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ def test_init_app_config_stackdriver_exporter(self):
119119
},
120120
}
121121

122-
middleware = flask_middleware.FlaskMiddleware()
122+
class StackdriverExporter(object):
123+
def __init__(self, *args, **kwargs):
124+
pass
125+
126+
middleware = flask_middleware.FlaskMiddleware(
127+
exporter=StackdriverExporter
128+
)
123129
middleware.init_app(app)
124130

125131
self.assertIs(middleware.app, app)

0 commit comments

Comments
 (0)