webcompat / webcompat-metrics-server

Server in charge of delivering different data to the webcompat-metrics-client
Mozilla Public License 2.0
6 stars 5 forks source link

Fixes #87 - Connect daily_total script to the db #88

Closed laghee closed 5 years ago

laghee commented 5 years ago

I don't have a test for this yet because I need to figure out how to test a script in unittest. Maybe we want to pull out the act of writing to the database and make it a helper function? That might make it easier to mock.

🤷‍♀️ Let me know what you think, @karlcow ...

karlcow commented 5 years ago

I don't have a test for this yet because I need to figure out how to test a script in unittest.

Currently the script is not very testable because it's all a big main function with a couple of functions, but it doesn't have to be. It's not that much of an issue for now. We started with a small script and it's ok.

We can create more functions and associated tests with it. Basically you will not "test a script" but you will be testing the functions in that script. We can create a new issue for this so we don't forget.

laghee commented 5 years ago

Changes made, @karlcow!