Skip to content

Commit

Permalink
options
Browse files Browse the repository at this point in the history
  • Loading branch information
l0lawrence committed Apr 3, 2024
1 parent bd4ea4e commit fe0623a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ async def release_cloud_events(
:type topic_name: str
:param subscription_name: Event Subscription Name. Required.
:type subscription_name: str
:param release_options: ReleaseOptions. Is one of the following types: ReleaseOptions, JSON,
:param options: ReleaseOptions. Is one of the following types: ReleaseOptions, JSON,
IO[bytes] Required.
:type release_options: ~azure.eventgrid.models.ReleaseOptions or JSON or IO[bytes]
:type options: ~azure.eventgrid.models.ReleaseOptions or JSON or IO[bytes]
:keyword release_delay_in_seconds: Release cloud events with the specified delay in seconds.
Known values are: 0, 10, 60, 600, and 3600. Default value is None.
:paramtype release_delay_in_seconds: int or ~azure.eventgrid.models.ReleaseDelay
Expand All @@ -374,7 +374,7 @@ async def release_cloud_events(
.. code-block:: python
# JSON input template you can fill out and use as your body input.
release_options = {
options = {
"lockTokens": [
"str" # Array of lock tokens. Required.
]
Expand Down
12 changes: 6 additions & 6 deletions sdk/eventgrid/azure-eventgrid/tests/test_eg_client_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_acknowledge_cloud_event_not_found(self, eventgrid_endpoint, eventgrid_k
with pytest.raises(ResourceNotFoundError):
lock_tokens = AcknowledgeOptions(lock_tokens=["faketoken"])
client.acknowledge_cloud_events(
"faketopic", eventgrid_event_subscription_name, acknowledge_options=lock_tokens
"faketopic", eventgrid_event_subscription_name, lock_tokens
)

@EventGridPreparer()
Expand All @@ -118,7 +118,7 @@ def test_release_cloud_event_not_found(self, eventgrid_endpoint, eventgrid_key,
with pytest.raises(ResourceNotFoundError):
lock_tokens = ReleaseOptions(lock_tokens=["faketoken"])
client.release_cloud_events(
"faketopic", eventgrid_event_subscription_name, release_options=lock_tokens
"faketopic", eventgrid_event_subscription_name, lock_tokens
)

@EventGridPreparer()
Expand All @@ -129,7 +129,7 @@ def test_reject_cloud_event_not_found(self, eventgrid_endpoint, eventgrid_key, e

with pytest.raises(ResourceNotFoundError):
client.reject_cloud_events(
"faketopic", eventgrid_event_subscription_name, reject_options=lock_tokens
"faketopic", eventgrid_event_subscription_name, lock_tokens
)

@EventGridPreparer()
Expand All @@ -139,7 +139,7 @@ def test_acknowledge_cloud_event_invalid_token(self, eventgrid_endpoint, eventgr

lock_tokens = AcknowledgeOptions(lock_tokens=["faketoken"])
ack = client.acknowledge_cloud_events(
eventgrid_topic_name, eventgrid_event_subscription_name, acknowledge_options=lock_tokens
eventgrid_topic_name, eventgrid_event_subscription_name, lock_tokens
)
assert type(ack) == AcknowledgeResult
assert ack.succeeded_lock_tokens == []
Expand All @@ -153,7 +153,7 @@ def test_release_cloud_event_invalid_token(self, eventgrid_endpoint, eventgrid_k

lock_tokens = ReleaseOptions(lock_tokens=["faketoken"])
release = client.release_cloud_events(
eventgrid_topic_name, eventgrid_event_subscription_name, release_options=lock_tokens
eventgrid_topic_name, eventgrid_event_subscription_name, lock_tokens
)
assert type(release) == ReleaseResult
assert release.succeeded_lock_tokens == []
Expand All @@ -167,7 +167,7 @@ def test_reject_cloud_event_invalid_token(self, eventgrid_endpoint, eventgrid_ke
lock_tokens = RejectOptions(lock_tokens=["faketoken"])

reject = client.reject_cloud_events(
eventgrid_topic_name, eventgrid_event_subscription_name, reject_options=lock_tokens
eventgrid_topic_name, eventgrid_event_subscription_name, lock_tokens
)
assert type(reject) == RejectResult
assert reject.succeeded_lock_tokens == []
Expand Down

0 comments on commit fe0623a

Please sign in to comment.