File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ def modify_response(request):
9393 method = 'POST' ).mock (side_effect = modify_response )
9494
9595# Mock the subscription description API endpoint.
96- describe_mock = respx .mock ()
97- describe_mock .route (
96+ get_mock = respx .mock ()
97+ get_mock .route (
9898 M (url = f'{ TEST_URL } /test' ),
9999 method = 'GET' ).mock (return_value = Response (200 ,
100100 json = {
@@ -247,7 +247,7 @@ async def test_get_subscription_failure():
247247
248248
249249@pytest .mark .anyio
250- @describe_mock
250+ @get_mock
251251async def test_get_subscription_success (monkeypatch ):
252252 """Subscription description fetched, has the expected items."""
253253 async with Session () as session :
Original file line number Diff line number Diff line change 33There are 6 subscriptions commands:
44
55[x] planet subscriptions list
6- [x] planet subscriptions describe
6+ [x] planet subscriptions get
77[x] planet subscriptions results
88[x] planet subscriptions create
99[x] planet subscriptions update
2424 create_mock ,
2525 update_mock ,
2626 cancel_mock ,
27- describe_mock ,
27+ get_mock ,
2828 res_api_mock ,
2929 TEST_URL )
3030
@@ -192,10 +192,10 @@ def test_subscriptions_update_success(invoke):
192192
193193
194194@failing_api_mock
195- def test_subscriptions_describe_failure (invoke ):
195+ def test_subscriptions_get_failure (invoke ):
196196 """Describe command exits gracefully from an API error."""
197197 result = invoke (
198- ['describe ' , 'test' ],
198+ ['get ' , 'test' ],
199199 # Note: catch_exceptions=True (the default) is required if we want
200200 # to exercise the "translate_exceptions" decorator and test for
201201 # failure.
@@ -204,11 +204,11 @@ def test_subscriptions_describe_failure(invoke):
204204 assert result .exit_code == 1 # failure.
205205
206206
207- @describe_mock
208- def test_subscriptions_describe_success (invoke ):
207+ @get_mock
208+ def test_subscriptions_get_success (invoke ):
209209 """Describe command succeeds."""
210210 result = invoke (
211- ['describe ' , 'test' ],
211+ ['get ' , 'test' ],
212212 # Note: catch_exceptions=True (the default) is required if we want
213213 # to exercise the "translate_exceptions" decorator and test for
214214 # failure.
You can’t perform that action at this time.
0 commit comments