Closed mjschultz closed 9 years ago
You are on a roll. This is great work. I will merge once the CI build completes.
Alright, I'm done adding tests now. On my box these changes get to about 96% coverage with the uncovered lines being ones that are hard to test/depend on specific versions of python and/or django.
This should allow safer refactoring of certain parts of the library and adding features as needed by others.
At long last it passes against all defined versions of django and python. Some features don't seem to work for certain versions of django/python though (specifically geoip on python 3+ with django 1.5.x). (Sorry if travis generated an email for all those failures!)
Marathon.
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'ssmart_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.