kraiz/django-crontab — pull request #15 by arski (2014-10-08 09:05:28+00:00)
Title: Travis preparings

PR'ing into your own branch first, see if you're happy with the changes, then we can merge into master.

Travis passes now, which is a yay. The tests are a bit "thin", i.e. they don't write to a real crontab, which is very hard to test without affecting the current user (kronos doesn't do that either, they just mock the reading which is effectively testing nothing). At least the way you've setup `crontab_lines` writing via a temp file, I was able to add a test that check the contents of the temp file with the cronjobs that is about to be written to the crontab, which isn't half bad imo.

In other changes, I've moved code out of __init__ files cause I don't think that's very good practice, let me know if you disagree with that.

And in order for the `@override_settings` to work on tests, I had to move the app-defined settings into a class, otherwise they're loaded first and used without override, since the main crontab class doesn't load settings from `django.conf` again but rather from the local `app_settings`.

share your thoughts :)