neoliberal / user_pinger_2

Bot + accessory services for pinging groups on a subreddit
MIT License
9 stars 2 forks source link

Testing or mocking out reddit client #24

Open theredcameron opened 1 year ago

theredcameron commented 1 year ago

It is difficult to test the bot when Reddit PRAW and slack logging components are directly implemented within the code. Testing would be easier and safer if we were to add a layer of abstraction to the bot that enabled us to 'mock' the reddit connection and logging.

theredcameron commented 1 year ago

Nevermind. I see that has been implemented.

theredcameron commented 1 year ago

I realize that the tests still depend on a direct connection to Reddit. This will still need to be 'mocked' out.

jenbanim commented 1 year ago

Yeah the entire testing infrastructure is broken and out of date. I'm focusing on features for now, but I'll eventually clean up the codebase