Fixes for Django 1.10#16
Conversation
| self.assertEqual("1 day, 3:00:00, 1:00:00, 2 days, 1:10:04", str(obj)) | ||
| self.assertEqual(str(obj.not_required_interval), '1 day, 3:00:00') | ||
| # TODO: Why don't these 2 commented lines pass in either postgres or sqlite? | ||
| # self.assertEqual(str(obj.required_interval), '1:00:00') |
There was a problem hiding this comment.
This actually fails because str(obj.required_interval) evaluates to 3:00:00. It seems that the form has the correct value when it saves the model, but the value has become 10800 seconds by the time it reaches the Interval model field.
|
Thanks for the PR, could you please spare some time and fix Travis too ? |
|
Hi @mpasternak, Ah yes. Hum, I don't quite have any more time for this at the moment. I'll get to it if I get time though. Some help with that test with is reporting 3 hours would be very much appreciated. Do you also know what versions of django & python you want to support going forward? |
|
TBH the project that django-interval-field was built for is currently unmaintained, so thanks for the patches. We need working travis to continue. I guess backwards compatibility with django 1.6-1.10 is possible. Python… 2.7 and 3.5 should be fine. There are no things in the code that would require a specific Django or Python version, I think… —
|
These fixes get django-interval-field working with Django 1.10.
There is a slight caveat that the test
test_project.test_app.tests.TestTestApp.test_createhad a couple of assertions that I couldn't seem to fix (see comments), but everything else seems to be working.I've run the tests for both sqlite & postgres.