bruth/django-tracking2 — pull request #44 by mjschultz (2014-12-07 21:50:29+00:00)
Title: Additional tests and fixes

I've added a few more tests to get the code coverage up to about 90%. They're still not the best of tests, but they're getting better!

I accidentally made a slight regression in the last PR for a case that *probably* never happens (incoming unicode-typed `User-Agent`). I added a test and switched to using django's `smart_text` that does the magic for us.

Beyond that, I added tests for the managers and fixed up some bugs in them. More aggressively I removed most (all?) of the `.date()` calls so most of those pieces consume a full datetime now. A date can still be passed in, but it'll generate a RuntimeWarning when done. *This* codebase should be clean of that possibility, people using this codebase will have to deal with their own RuntimeWarnings.

I also added some datetime pickers to the base.html, so now it is obvious what time range is being shown to the user when they visit the page. I also updated the README to explicitly state that.

IMO this should resolve issues https://github.com/bruth/django-tracking2/issues/20, https://github.com/bruth/django-tracking2/issues/28, and https://github.com/bruth/django-tracking2/issues/39.