Skip to content

Commit

Permalink
move the fixture back to module level
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed May 31, 2020
1 parent 4262575 commit 3c0dad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dlp/risk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# We observe sometimes all the tests in this file fail. In a
# hypothesis where DLP service somehow loses the connection to the
# topic, now we use function scope for Pub/Sub fixtures.
@pytest.fixture(scope="function")
@pytest.fixture(scope="module")
def topic_id():
# Creates a pubsub topic, and tears it down.
publisher = google.cloud.pubsub.PublisherClient()
Expand All @@ -59,7 +59,7 @@ def topic_id():
publisher.delete_topic(topic_path)


@pytest.fixture(scope="function")
@pytest.fixture(scope="module")
def subscription_id(topic_id):
# Subscribes to a topic.
subscriber = google.cloud.pubsub.SubscriberClient()
Expand Down

0 comments on commit 3c0dad3

Please sign in to comment.