File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
optional-kubernetes-engine/tests Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 3030TOPIC_NAME = "projects/{}/topics/{}" .format (project_id , "translate" )
3131
3232
33- @pytest .yield_fixture
33+ @pytest .fixture
3434def db ():
3535 def clear_collection (collection ):
3636 """Removes every document from the collection, to make it easy to see
@@ -54,13 +54,13 @@ def clear_collection(collection):
5454 yield client
5555
5656
57- @pytest .yield_fixture
57+ @pytest .fixture
5858def publisher ():
5959 client = pubsub .PublisherClient ()
6060 yield client
6161
6262
63- @pytest .yield_fixture
63+ @pytest .fixture
6464def subscriber ():
6565 subscriber = pubsub .SubscriberClient ()
6666 subscriber .create_subscription (
Original file line number Diff line number Diff line change 2626os .environ ['GOOGLE_CLOUD_PROJECT' ] = project_id
2727
2828
29- @pytest .yield_fixture
29+ @pytest .fixture
3030def app (request ):
3131 """This fixture provides a Flask app instance configured for testing.
3232
@@ -38,7 +38,7 @@ def app(request):
3838 yield app
3939
4040
41- @pytest .yield_fixture
41+ @pytest .fixture
4242def firestore ():
4343
4444 import firestore
Original file line number Diff line number Diff line change 2222from retrying import retry
2323
2424
25- @pytest .yield_fixture (params = ['datastore' , 'mongodb' ])
25+ @pytest .fixture (params = ['datastore' , 'mongodb' ])
2626def app (request ):
2727 """This fixtures provides a Flask app instance configured for testing.
2828
@@ -43,7 +43,7 @@ def app(request):
4343 yield app
4444
4545
46- @pytest .yield_fixture
46+ @pytest .fixture
4747def model (monkeypatch , app ):
4848 """This fixture provides a modified version of the app's model that tracks
4949 all created items and deletes them at the end of the test.
You can’t perform that action at this time.
0 commit comments