arturtamborski / notion-py

(Fork of) Unofficial Python API client for Notion.so
https://pypi.org/project/notion-py/
MIT License
63 stars 9 forks source link

Fix source in FileBlock #46

Closed arturtamborski closed 4 years ago

arturtamborski commented 4 years ago
_______________________________ test_file_block ________________________________

notion = NotionTestContext(client=<notion.client.NotionClient object at 0x7f60163e1610>, root_page=...>)

    def test_file_block(notion):
        block = notion.root_page.children.add_new(FileBlock)
        assert_block_is_okay(**locals(), type="file")

        assert block.title == ""
        assert block.source == ""
        assert block.file_id is None

        title = "requirements.txt"
        block.upload_file(title)
        block.title = title
        block.refresh()

        assert block.title == title
>       assert "secure.notion-static.com" in block.source
E       TypeError: argument of type 'NoneType' is not iterable

smoke_tests/block/test_upload.py:19: TypeError

https://github.com/arturtamborski/notion-py/runs/1085513350?check_suite_focus=true