Still working on getting my tests to run. I have 2 issues right now:

1) I want to load data from fixture files. In this case I am trying to
load auth data to test the logins. I have this in my test code:

from django.test import TestCase
from django.contrib.auth.models import User, Permission

class MeasDataTest(TestCase):

    fixtures = ['auth_user', 'auth_permission']

The auth_user and auth_permission files are in my apps fixtures dir
(which is a subdir of where the models.py file is). But when run the
test, it does not pick these up. What am I doing wrong here?

2) We have a stand alone program that loads data to the db. It's a
django program in that it picks up the apps settings and uses the
models and django API, but it's stand along in that it runs from cron
and not from a web request. I want to run this from my tests, so I'm
invoking it from my test class using subprocess.Popen. I would think
it would use the test's environment and update the test db. But it
does not do that, but neither does it update the 'real' database. It
gives all indications of working though. I'm going to set a breakpoint
in it and see if I can tell more about what it's doing, but should I
expect an externally invoked script like this to hit the test db?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to