2015-11-09 25 views
5

In definitiva, voglio passare i test per Django 1.9. django-celery attualmente funziona con Django < 1.9. Quindi il primo passo è fare in modo che i test della libreria passino con Django 1.8 sulla mia macchina.Esegui i test di django-sedano su Django 1.8

Ho clonato https://github.com/celery/django-celery in un progetto di test e installato i requisiti. Per Django 1.7 i test stanno passando. Per Django 1.8 sto ottenendo lo stesso errore più volte mentre dovrebbe funzionare ...

Vedi https://github.com/celery/django-celery/blob/master/tox.ini comprende Django 1.8:

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

per Django 1.7:

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

Per 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) 

Cosa mi manca?

+0

Hi François, il progetto 'django-celery' è deprecato (supporto Django è ora direttamente incluso nel pacchetto' celery') . C'è una ragione specifica per cui vuoi convalidare il supporto per Django 1.9? – Sebastian

+0

Sì, stavo lavorando su un progetto abbastanza grande e vecchio usando 'django-sedano'. Voglio approfittare di alcune funzionalità di Django 1.9. Sembra che sia meglio rimuoverlo che aggiornarlo. –

risposta

Problemi correlati