Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Django testing not loading certain fixtures [RSS Feed]

#1 Dec. 23, 2010 12:57:37

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django testing not loading certain fixtures


I'm experiencing some problems when loading fixtures for Django
unittests.

If I create a fixture with manage.py dumpdata, then loading of the
fixture works (except for the fact that there is an sql error, as i am
using mysql innodb and django dumps some records before others with
foreign key references to tables that do not exist yet)

So to resolve this foreign key issue i dumped the data with the
command specifying the applications to dump: manage.py dumpdata auth
registration packets. The resulting fixture, which is essentially the
same as the one above can not be loaded. I have not been able to
figure out the reason, because loaddata loads the fixture without any
issues.

Thanks for the help

Caro

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 23, 2010 15:01:10

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django testing not loading certain fixtures


never mind...error on my side

On Dec 23, 1:52 pm, caroline <caromeye...@gmail.com> wrote:
> I'm experiencing some problems when loading fixtures for Django
> unittests.
>
> If I create a fixture with manage.py dumpdata, then loading of the
> fixture works (except for the fact that there is an sql error, as i am
> using mysql innodb and django dumps some records before others with
> foreign key references to tables that do not exist yet)
>
> So to resolve this foreign key issue i dumped the data with the
> command specifying the applications to dump: manage.py dumpdata auth
> registration packets. The resulting fixture, which is essentially the
> same as the one above can not be loaded. I have not been able to
> figure out the reason, because loaddata loads the fixture without any
> issues.
>
> Thanks for the help
>
> Caro

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 23, 2010 21:18:17

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django testing not loading certain fixtures


Are you loading you fixtures within your test class?

eg. fixtures =

Make sure that also you have included in yoour settings file the
following:
FIXTURE_DIRS = ( os.path.join(PROJECT_PATH, '../testing/fixtures')
of course with the path where you fixture is.

Hope this helps

On Dec 23, 11:52 pm, caroline <caromeye...@gmail.com> wrote:
> I'm experiencing some problems when loading fixtures for Django
> unittests.
>
> If I create a fixture with manage.py dumpdata, then loading of the
> fixture works (except for the fact that there is an sql error, as i am
> using mysql innodb and django dumps some records before others with
> foreign key references to tables that do not exist yet)
>
> So to resolve this foreign key issue i dumped the data with the
> command specifying the applications to dump: manage.py dumpdata auth
> registration packets. The resulting fixture, which is essentially the
> same as the one above can not be loaded. I have not been able to
> figure out the reason, because loaddata loads the fixture without any
> issues.
>
> Thanks for the help
>
> Caro

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Django testing not loading certain fixtures [RSS Feed]

Board footer

Moderator control

Enjoy the 16th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support