Skip to content

Commit 63f1fa3

Browse files
authored
fix: update deprecated methods (GoogleCloudPlatform#424)
1 parent ada42dc commit 63f1fa3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

background/app/main_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
TOPIC_NAME = "projects/{}/topics/{}".format(project_id, "translate")
3131

3232

33-
@pytest.yield_fixture
33+
@pytest.fixture
3434
def 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
5858
def publisher():
5959
client = pubsub.PublisherClient()
6060
yield client
6161

6262

63-
@pytest.yield_fixture
63+
@pytest.fixture
6464
def subscriber():
6565
subscriber = pubsub.SubscriberClient()
6666
subscriber.create_subscription(

bookshelf/main_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
os.environ['GOOGLE_CLOUD_PROJECT'] = project_id
2727

2828

29-
@pytest.yield_fixture
29+
@pytest.fixture
3030
def 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
4242
def firestore():
4343

4444
import firestore

optional-kubernetes-engine/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from retrying import retry
2323

2424

25-
@pytest.yield_fixture(params=['datastore', 'mongodb'])
25+
@pytest.fixture(params=['datastore', 'mongodb'])
2626
def 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
4747
def 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.

0 commit comments

Comments
 (0)