dimanche 8 novembre 2015

Run django-celery tests on Django 1.8

Ultimately, I want to get the tests to pass for Django 1.9. django-celery currently works with Django < 1.9. So the first is to make sure that the library tests are passing with Django 1.8 on my machine.

I've cloned http://ift.tt/1M1kShU in a testing project and installed the requirements. For Django 1.7 the tests are passing. For Django 1.8 I'm getting the same error several times while it should work...

See http://ift.tt/1leFVFh includes Django 1.8:

...
1.8: Django>=1.8.0,<1.9.0


For Django 1.7:

pip install Django==1.7
./django-celery/tests/manage.py test djcelery.tests
...
Ran 64 tests in 0.319s
OK


For Django 1.8:

pip install Django==1.8
./django-celery/tests/manage.py test djcelery.tests

...
======================================================================
ERROR: test_all_as_schedule (djcelery.tests.test_schedulers.test_DatabaseScheduler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/francois/web/test_project/django-celery/djcelery/tests/test_schedulers.py", line 110, in setUp
    m1 = create_model_interval(schedule(timedelta(seconds=10)))
  File "/Users/francois/web/test_project/django-celery/djcelery/tests/test_schedulers.py", line 20, in create_model_interval
    **kwargs)
  File "/Users/francois/web/test_project/django-celery/djcelery/tests/test_schedulers.py", line 40, in create_model
    return Model(**dict(entry, **kwargs))
  File "/Users/francois/Envs/test_project/lib/python2.7/site-packages/django/db/models/base.py", line 468, in __init__
    setattr(self, field.name, rel_obj)
  File "/Users/francois/Envs/test_project/lib/python2.7/site-packages/django/db/models/fields/related.py", line 668, in __set__
    (value, self.field.rel.to._meta.object_name)
ValueError: Cannot assign "<IntervalSchedule: every 10.0 seconds>": "IntervalSchedule" instance isn't saved in the database.


 ...
 Ran 64 tests in 0.150s

 FAILED (errors=15)

What am I missing?

Aucun commentaire:

Enregistrer un commentaire