On Thu, May 27, 2010 at 3:34 PM, Bryan <bryan.wheel...@gmail.com> wrote:

> just checked this again.
>
> I changed the fixtures name to:
>
> $ ls forum/fixtures
> forum_fixtures.json
>
> class UserProfileTestCases(TestCase):
>    """These are tests to verify that refactoring of UserProfile is
> correct"""
>    fixtures = ['forum_fixtures.json']
>
> $ python manage.py test
> Creating test database 'default'...
> <<SNIP>>
> No fixtures found.
>
> I don't know why this is happening, but it is. :-(
>

All I can say is it's working for me, really, and I honestly expect if this
were in fact broken in general we'd have heard a lot more about it than a
single report.

Also, the "No fixtures found" just means no initial data fixtures were
found. I get the "No fixtures found" for my working test run that requires a
fixture file to be successfully loaded. As I tried to note in my previous
response, the feedback related to loading non-initial-data fixtures in the
test runner is poor. Near as I can tell it is nonexistent.  (There's likely
a good reason for that -- these things are loaded for each and every test
method in the test case, so any output would potentially be repeated many
many times. I've not looked at this code in any detail yet to see if an
error situation with a fixture not being found can reasonably be reported.)

What happens if you change your settings file to point to a temporary/test
DB and try manage.py loaddata for this fixture? The output there should tell
you whether any fixture with that name is found, and if so, how many objects
were loaded from it. Further, you could actually then check the DB to see if
what was loaded is what you (and your test) are expecting.

Karen
-- 
http://tracey.org/kmt/

-- 
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 at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to