|
1 | 1 | def test_get(): |
2 | | - import scratchattach as sa |
3 | | - project = sa.get_project(104) |
4 | | - assert project |
5 | | - assert project.title == "Weekend" |
6 | | - assert project.author_name == "andresmh" |
| 2 | + import scratchattach as sa |
| 3 | + project = sa.get_project(1209355136) |
| 4 | + |
| 5 | + assert project |
| 6 | + assert project.title == "Sample project #1" |
| 7 | + assert project.author_name == "ScratchAttachV2" |
| 8 | + assert project.embed_url == "https://scratch.mit.edu/projects/1209355136/embed" |
| 9 | + assert project.is_shared() |
| 10 | + # create_remix |
| 11 | + # load_description |
| 12 | + # download |
| 13 | + # get_json |
| 14 | + # body |
| 15 | + # raw_json |
| 16 | + # raw_json_or_empty |
| 17 | + # creator_agent |
| 18 | + assert project.author().id == 147905216 |
| 19 | + # studios |
| 20 | + comment = project.comments()[0] # TODO: move this to a separate comment tester |
| 21 | + # comment_by_id |
| 22 | + #comment_replies |
| 23 | + # comment by id |
| 24 | + # (un)love |
| 25 | + # (un)favorite |
| 26 | + # pos_view |
| 27 | + # set_fields |
| 28 | + # turn on/off/toggle commenting |
| 29 | + # (un)share |
| 30 | + # set thumb |
| 31 | + # delete comment |
| 32 | + # report comment |
| 33 | + # post/reply comment |
| 34 | + # set body/json/upload json from |
| 35 | + # set title/instruction/notes |
| 36 | + # visibility |
| 37 | + |
| 38 | + |
| 39 | + assert comment.id == 489648029 |
| 40 | + |
| 41 | + remix = project.remixes()[0] |
| 42 | + assert remix.id == 1209582809 |
| 43 | + assert remix.title == "Sample remix" |
| 44 | + assert remix.author_name == "ScratchAttachV2" |
| 45 | + assert remix.embed_url == "https://scratch.mit.edu/projects/1209582809/embed" |
| 46 | + |
| 47 | + assert sa.get_project(414601586).moderation_status() == "notsafe" |
| 48 | + assert sa.get_project(1207314193).moderation_status() == "safe" |
| 49 | + assert sa.get_project(1233).moderation_status() == "notreviewed" # if this becomes reviewed, please update this |
| 50 | + # ^^ also this project is an infinite remix loop! |
| 51 | + |
| 52 | + assert sa.explore_projects() |
| 53 | + assert sa.search_projects(query="scratchattach") |
0 commit comments