Skip to content

Commit

Permalink
TST: Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Dec 12, 2024
1 parent 8048c56 commit 357921d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/resources/test_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
from multiprocessing import Value
from unittest.mock import patch

from google.auth.exceptions import DefaultCredentialsError
from google.api_core.exceptions import NotFound

from octue.cloud.emulators._pub_sub import MockAnalysis, MockService
from octue.cloud.emulators.service import ServicePatcher
from octue.cloud.pub_sub.service import Service
from octue.resources.child import Child
from octue.resources.service_backends import GCPPubSubBackend
from tests import MOCK_SERVICE_REVISION_TAG
from tests import MOCK_SERVICE_REVISION_TAG, TEST_PROJECT_NAME
from tests.base import BaseTestCase
from tests.cloud.pub_sub.test_service import BACKEND

Expand Down Expand Up @@ -83,12 +83,12 @@ def test_child_cannot_be_asked_question_without_credentials(self):
with patch.dict(os.environ, clear=True):
child = Child(
id=f"octue/my-child:{MOCK_SERVICE_REVISION_TAG}",
backend={"name": "GCPPubSubBackend", "project_name": "blah"},
backend={"name": "GCPPubSubBackend", "project_name": TEST_PROJECT_NAME},
)

Service(backend=BACKEND, service_id=child.id).serve()

with self.assertRaises(DefaultCredentialsError):
with self.assertRaises(NotFound):
child.ask({"some": "input"})

def test_child_can_be_asked_multiple_questions_in_serial(self):
Expand Down

0 comments on commit 357921d

Please sign in to comment.