Skip to content

Commit 5eafbaa

Browse files
test(boxsdkgen): remove token downscope from notes test (box/box-codegen#957) (#1459)
1 parent 555f8f1 commit 5eafbaa

3 files changed

Lines changed: 7 additions & 17 deletions

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "5a7add6", "specHash": "d028758", "version": "4.10.0" }
1+
{ "engineHash": "2e559a0", "specHash": "d028758", "version": "4.10.0" }

docs/box_sdk_gen/notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the endpoint docs at
1414
<!-- sample post_notes_convert_v2026.0 -->
1515

1616
```python
17-
downscoped_client.notes.create_note_convert_v2026_r0(markdown_content, FolderReferenceV2026R0(id='0'), note_name, content_format=CreateNoteConvertV2026R0ContentFormat.MARKDOWN)
17+
client.notes.create_note_convert_v2026_r0(markdown_content, FolderReferenceV2026R0(id='0'), note_name, content_format=CreateNoteConvertV2026R0ContentFormat.MARKDOWN)
1818
```
1919

2020
### Arguments

test/box_sdk_gen/test/notes.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from box_sdk_gen.internal.utils import to_string
22

3-
from box_sdk_gen.schemas.access_token import AccessToken
4-
53
from box_sdk_gen.schemas.v2026_r0.notes_convert_response_v2026_r0 import (
64
NotesConvertResponseV2026R0,
75
)
@@ -20,8 +18,6 @@
2018

2119
from box_sdk_gen.client import BoxClient
2220

23-
from box_sdk_gen.box.developer_token_auth import BoxDeveloperTokenAuth
24-
2521
from test.box_sdk_gen.test.commons import get_default_client_with_user_subject
2622

2723
client: BoxClient = get_default_client_with_user_subject(get_env_var('USER_ID'))
@@ -32,17 +28,11 @@ def testConvertMarkdownToBoxNote():
3228
markdown_content: str = r"""# Heading
3329
3430
Some text"""
35-
downscoped_token: AccessToken = client.auth.downscope_token(['item_upload'])
36-
downscoped_client: BoxClient = BoxClient(
37-
auth=BoxDeveloperTokenAuth(token=downscoped_token.access_token)
38-
)
39-
response: NotesConvertResponseV2026R0 = (
40-
downscoped_client.notes.create_note_convert_v2026_r0(
41-
markdown_content,
42-
FolderReferenceV2026R0(id='0'),
43-
note_name,
44-
content_format=CreateNoteConvertV2026R0ContentFormat.MARKDOWN,
45-
)
31+
response: NotesConvertResponseV2026R0 = client.notes.create_note_convert_v2026_r0(
32+
markdown_content,
33+
FolderReferenceV2026R0(id='0'),
34+
note_name,
35+
content_format=CreateNoteConvertV2026R0ContentFormat.MARKDOWN,
4636
)
4737
assert not response.id == ''
4838
assert to_string(response.type) == 'file'

0 commit comments

Comments
 (0)