Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

views: moderation: Add unit tests, proper response instead of "Yo", apiDoc clarifications #805

Merged
merged 11 commits into from
Mar 5, 2022

Conversation

fliiiix
Copy link
Contributor

@fliiiix fliiiix commented Feb 26, 2022

Things this PR addresses:

  • Replace Yo response from moderation with a more appropriate response
  • Add tests for moderation
  • Add tests for unsubscribe and fix doc string

Contributes to #755

@ix5 ix5 added feature server (Python) server code labels Feb 26, 2022
@ix5 ix5 added this to the 0.13 milestone Feb 27, 2022
Copy link
Member

@ix5 ix5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice effort! Some minor nits here and there.

Please also keep commit message titles under 50 chars (or at least under 70, if otherwise not possible), else GitHub will hard-break the title with ellipses.

isso/tests/test_comments.py Outdated Show resolved Hide resolved
isso/tests/test_comments.py Outdated Show resolved Hide resolved
isso/tests/test_comments.py Outdated Show resolved Hide resolved
isso/tests/test_comments.py Outdated Show resolved Hide resolved
isso/tests/test_comments.py Show resolved Hide resolved
isso/tests/test_comments.py Outdated Show resolved Hide resolved
isso/views/comments.py Outdated Show resolved Hide resolved
isso/views/comments.py Outdated Show resolved Hide resolved
isso/views/comments.py Outdated Show resolved Hide resolved
@fliiiix
Copy link
Contributor Author

fliiiix commented Feb 27, 2022

Thanks for the review 🎉 i addressed all your feedback, take an other look if you spot any issues

Except the thing with the git commit message length, im not to sure what i should do there I can drop the prefix to make them shorter, but i guess the idea is to use prefixes? I can create super short unspecific commit messages which i feel would be worse.
So i am a bit lost how i should solve that any ideas?

@fliiiix fliiiix requested a review from ix5 February 27, 2022 20:26
Copy link
Member

@ix5 ix5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except the thing with the git commit message length, im not to sure what i should do there I can drop the prefix to make them shorter, but i guess the idea is to use prefixes? I can create super short unspecific commit messages which i feel would be worse. So i am a bit lost how i should solve that any ideas?

Don't worry too much about that. Those commit message conventions are just that, conventions. I personally use abbreviations or more terse wording and kind of "force" myself to keep below 50 chars, as I've set my editor to "warn" me when I go over.

E.g.

views: comments: moderation: Replace Yo response with a more descriptive text

I'd replace with

views: comments: Proper response instead of 'Yo'

But again, that's just stylistic pet peeves. You'll notice the usefulness of short commit messages when browsing git logs and being annoyed at the cut-off messages ending in ellipses.


Thanks for those tests. One inline comment, everything else looks marvelous!

isso/views/comments.py Outdated Show resolved Hide resolved
@ix5 ix5 changed the title Moderating add testing views: moderation: Add unit tests, proper response instead of "Yo", apiDoc clarifications Mar 3, 2022
The "key" does _contain_ a base64-encoded list of
'["unsubscribe","<email>"]' but also a signature.
As such, remove the comment to avoid confusion (above, it is
mentioned where the key is obtained from).

Also add the "unsubscribe" part to the request URL that was
missing.
@ix5
Copy link
Member

ix5 commented Mar 5, 2022

Verified using make test and npm i apidoc; npx apidoc --config apidoc.json --input isso/ --output _apidoc/

Thank you for your contribution!

@ix5 ix5 merged commit 8bf8459 into isso-comments:master Mar 5, 2022
@ix5 ix5 modified the milestones: 0.13, 0.12.6 Mar 5, 2022
@fliiiix fliiiix deleted the moderating-add-testing branch March 28, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature server (Python) server code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants