On Wed, Feb 11, 2009 at 10:11 PM, Andrea Reginato
<[email protected]> wrote:
>
> On Feb 11, 1:59 pm, felix <[email protected]> wrote:
>> do you have large initial_data fixtures ?
>>
>> tables get flushed and initial_data is added each time.
>
> Yes, looking at it it's quite huge, and if it's loaded each time for
> sure that is the problem, so thanks.

I would also note that in SVN trunk (soon to be delivered as v1.1), we
have modified the test system to use transaction rollbacks rather than
flushing the database. This can significantly speed up instances of
django.test.TestCase that use fixtures.

> I wanted also to ask if the template, that load images in an external
> server, can be source of some problems.

Depending on your test it could be, but it probably isn't. If your
view code is explicitly requesting external resources, then the view
will run as slow as the resource requests they make. However, this
will also be true during runtime, so if your tests are running slow
for this reason, this flags a possible performance problem for your
production site.

If you're just talking about a rendered HTML page that contains links
to images, having images on an external server shouldn't be causing
any problems. Django's test client isn't a full browser; it's just
simulates some simple browser behaviour (like sessions) to let you
test view code. If your rendered HTML references an image, Django's
test client won't attempt to download the image.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to