Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updates
  • Loading branch information
l0lawrence committed May 24, 2024
commit 7044424c17a421465a4ff47c709ecabc10140b31
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from azure.mgmt.eventgrid.models import Topic, InputSchema, JsonInputSchemaMapping, JsonField, JsonFieldWithDefault

EVENTGRID_TOPIC_PARAM = 'eventgrid_topic'
EVENTGRID_TOPIC_LOCATION = 'westus'
EVENTGRID_TOPIC_LOCATION = 'eastus'
CLOUD_EVENT_SCHEMA = InputSchema.cloud_event_schema_v1_0
CUSTOM_EVENT_SCHEMA = InputSchema.custom_event_schema
ID_JSON_FIELD = JsonField(source_field='customId')
Expand Down
6 changes: 2 additions & 4 deletions sdk/eventgrid/azure-eventgrid/tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def create_eg_publisher_client(self, endpoint):

@pytest.mark.live_test_only
@EventGridPreparer()
@recorded_by_proxy
def test_raise_on_auth_error(self, eventgrid_topic_endpoint):
def test_raise_on_auth_error(self, *, eventgrid_topic_endpoint, **kwargs):
akc_credential = AzureKeyCredential("bad credential")
client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential)
eg_event = EventGridEvent(
Expand All @@ -42,10 +41,9 @@ def test_raise_on_auth_error(self, eventgrid_topic_endpoint):
with pytest.raises(ClientAuthenticationError, match="The request authorization key is not authorized for*"):
client.send(eg_event)

@pytest.mark.skip("Fix during MQ - skip to unblock pipeline")
@pytest.mark.live_test_only
@EventGridPreparer()
def test_raise_on_bad_resource(self, eventgrid_topic_key):
def test_raise_on_bad_resource(self, *, eventgrid_topic_key, **kwargs):
akc_credential = AzureKeyCredential(eventgrid_topic_key)
client = EventGridPublisherClient("https://bad-resource.westus-1.eventgrid.azure.net/api/events", akc_credential)
eg_event = EventGridEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ def create_eg_publisher_client(self, endpoint):

@pytest.mark.live_test_only
@EventGridPreparer()
@recorded_by_proxy_async
@pytest.mark.asyncio
async def test_raise_on_auth_error(self, eventgrid_topic_endpoint):
async def test_raise_on_auth_error(self, *, eventgrid_topic_endpoint, **kwargs):
akc_credential = AzureKeyCredential("bad credential")
client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential)
eg_event = EventGridEvent(
Expand All @@ -45,11 +44,10 @@ async def test_raise_on_auth_error(self, eventgrid_topic_endpoint):
with pytest.raises(ClientAuthenticationError, match="The request authorization key is not authorized for*"):
await client.send(eg_event)

@pytest.mark.skip("Fix during MQ - skip to unblock pipeline")
@pytest.mark.live_test_only
@EventGridPreparer()
@pytest.mark.asyncio
async def test_raise_on_bad_resource(self, eventgrid_topic_key):
async def test_raise_on_bad_resource(self, *, eventgrid_topic_key, **kwargs):
akc_credential = AzureKeyCredential(eventgrid_topic_key)
client = EventGridPublisherClient("https://bad-resource.westus-1.eventgrid.azure.net/api/events", akc_credential)
eg_event = EventGridEvent(
Expand Down