Having LiveServerTestCase use same database as tests

189 views
Skip to first unread message

Phil Gyford

unread,
Aug 21, 2012, 11:24:59 AM8/21/12
to django...@googlegroups.com
I'm writing integration tests using LiveServerTestCase/Selenium in
v1.4.1. By default the process that's started by LiveServerTestCase
uses a different database to the test database used by the tests. This
is a pain because I can't use factories (I'm using FactoryBoy at the
moment) to create data to then test in the browser.

Is there a way I can get LiveServerTestCase using the same database as
the tests themselves?

Thanks,
Phil

--
http://www.gyford.com/

Phil Gyford

unread,
Oct 21, 2012, 12:37:12 PM10/21/12
to django...@googlegroups.com
No, I'm afraid not. I didn't get any replies (nor to a StackOverflow
question http://stackoverflow.com/q/12041315/250962 ) and haven't gone
back to try again. I'd tried everything I could think of already. Good
luck, and let us know if you get anywhere!


---------- Forwarded message ----------
From: Дмитрий Белавенцев <diz...@gmail.com>
Date: 21 October 2012 09:43
Subject: Re: Having LiveServerTestCase use same database as tests
To: django...@googlegroups.com
Cc: ph...@gyford.com


Hi, Phil! I faced the same problem. Do you find the solution?

вторник, 21 августа 2012 г., 22:24:59 UTC+7 пользователь Phil Gyford написал:
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/cgi4pq5P9nUJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to
django-users...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.


--
http://www.gyford.com/

Chris Wilson

unread,
Aug 1, 2014, 11:04:39 AM8/1/14
to django...@googlegroups.com, ph...@gyford.com
Hi Phil,


On Sunday, October 21, 2012 5:37:45 PM UTC+1, Phil Gyford wrote:
No, I'm afraid not. I didn't get any replies (nor to a StackOverflow
question http://stackoverflow.com/q/12041315/250962 ) and haven't gone
back to try again. I'd tried everything I could think of already. Good
luck, and let us know if you get anywhere!

Sorry for replying to an old message. Since this problem keeps coming up, I wanted to ensure that the answer is in the django-users archives.

I posted what I hope is a complete analysis of the problem and possible solutions on your StackOverflow question:

Cheers, Chris.
Reply all
Reply to author
Forward
0 new messages