notion-sdk-py icon indicating copy to clipboard operation
notion-sdk-py copied to clipboard

Added api endpoints test cases (blocks, blocks_children)

Open sudosubin opened this issue 2 years ago • 2 comments

I made a subdirectory ./tests/api_endpoints/ for ./notion_client/api_endpoints.py test cases, since there are amount of classes.

Any comments are welcome.

  • Added BlocksEndpoint, BlocksChildrenEndpoint test case
  • Some request/response come from notion api document.

sudosubin avatar Feb 26 '22 04:02 sudosubin

Codecov Report

Merging #116 (56ab645) into main (d1819de) will increase coverage by 1.24%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   83.81%   85.06%   +1.24%     
==========================================
  Files           7        7              
  Lines         241      241              
==========================================
+ Hits          202      205       +3     
+ Misses         39       36       -3     
Impacted Files Coverage Δ
notion_client/client.py 83.92% <0.00%> (-1.79%) :arrow_down:
notion_client/api_endpoints.py 75.43% <0.00%> (+8.77%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d1819de...56ab645. Read the comment docs.

codecov[bot] avatar Feb 26 '22 04:02 codecov[bot]

Sorry for the long answer but I'm not sure what I want to do with the tests. On this PR specifically, I don't like the fact that the block ids are set in stone, and that since you are the one that generated the cassettes, I wouldn't be able to regenerate them myself with my own API key and Notion workspace. Do you have any idea on what we could do so that it's a bit more permissive?

ramnes avatar Apr 18 '22 14:04 ramnes

Closing because there is no answer from OP but feel free to answer with any hint regarding my previous comment and I will gladly reopen, I'm definitely interested in more tests. :)

ramnes avatar Aug 19 '22 10:08 ramnes