Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 5892547

Browse files
committed
fix(tests): Fixed the patches to patch the correct name
1 parent 59879ad commit 5892547

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_upload.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ def remove():
161161
seal(notionClient)
162162
return notionClient
163163

164-
@patch('notion.client.NotionClient', new_callable=MockClient)
164+
@patch('md2notion.upload.NotionClient', new_callable=MockClient)
165165
def test_cli_no_arguments(mockClient):
166166
'''should error when nothing is passed'''
167167
#act/assert
168168
with pytest.raises(SystemExit):
169169
cli([])
170170

171171
@patch('md2notion.upload.upload')
172-
@patch('notion.client.NotionClient', new_callable=MockClient)
172+
@patch('md2notion.upload.NotionClient', new_callable=MockClient)
173173
def test_cli_create_single_page(mockClient, upload):
174174
'''should create a single page'''
175175
#act
@@ -184,7 +184,7 @@ def test_cli_create_single_page(mockClient, upload):
184184
assert args0[1].title == 'TEST.md'
185185

186186
@patch('md2notion.upload.upload')
187-
@patch('notion.client.NotionClient', new_callable=MockClient)
187+
@patch('md2notion.upload.NotionClient', new_callable=MockClient)
188188
def test_cli_create_multiple_pages(mockClient, upload):
189189
'''should create multiple pages'''
190190
#act
@@ -201,7 +201,7 @@ def test_cli_create_multiple_pages(mockClient, upload):
201201
assert args1[1].title == 'COMPREHENSIVE_TEST.md'
202202

203203
@patch('md2notion.upload.upload')
204-
@patch('notion.client.NotionClient', new_callable=MockClient)
204+
@patch('md2notion.upload.NotionClient', new_callable=MockClient)
205205
def test_cli_append(mockClient, upload):
206206
'''should append when using that flag'''
207207
#act
@@ -215,7 +215,7 @@ def test_cli_append(mockClient, upload):
215215
assert args0[1] == mockClient.get_block.return_value
216216

217217
@patch('md2notion.upload.upload')
218-
@patch('notion.client.NotionClient', new_callable=MockClient)
218+
@patch('md2notion.upload.NotionClient', new_callable=MockClient)
219219
def test_cli_clear_previous(mockClient, upload):
220220
'''should clear previously title pages with the same name when passed that flag'''
221221
#arrange

0 commit comments

Comments
 (0)