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

Remove posts from NSFW subreddits #16

Open
pmdevita opened this issue Jul 3, 2019 · 4 comments
Open

Remove posts from NSFW subreddits #16

pmdevita opened this issue Jul 3, 2019 · 4 comments
Labels
good first issue Good for newcomers

Comments

@pmdevita
Copy link
Owner

pmdevita commented Jul 3, 2019

As per r/switcharoo rules, not a difficult addition

@gautam678
Copy link

I can take this issue.

@gautam678
Copy link

@pmdevita How do your usually test a feature?

I've made a PR but I don't know how to test my feature.

#20

@pmdevita
Copy link
Owner Author

Yep thanks! Testing is difficult, you can turn it on a mode in the config that just makes it talk about what it would have done and then run it through the last 100 posts or so. I have started working on some unit tests and I already have tests for the regex but full testing for the bot would require the creation of one, possibly two, test subreddits which would then have to be filled with a lot of different kinds of tests. It would be a pretty significant undertaking so I haven't attempted it. However, now that I think about it, it would be handy to have to train new mods as well as test the bot.

I'm not at home right now and while I sync the project files between my desktop and laptop, I don't sync the local git repo and so it's difficult to do git operations at the moment without creating merge conflicts with the repo on my desktop. I'll probably be back by June and then I'll push in all my more recent stuff and a credentials.ini example and pull your patch down and test it. It should be fine from what I can tell though.

@pmdevita pmdevita added the good first issue Good for newcomers label Mar 30, 2021
@pmdevita
Copy link
Owner Author

pmdevita commented Apr 8, 2021

Here's the instructions for whoever picks this up.

A new issue should be created and appended to the master list. Then in the check_errors function, get the Subreddit object from the created PRAW Comment object and check whether it is over_18. This check should only be applied to roos newer than March 1st, 2021 due to some concerns with older roos. Then, strings should be added to the ModIssueStrings classes. Finally, a test case should be created as a part of the process/check_errors test cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants