On Feb 21, 12:47 pm, Cody Django wrote:
> Thanks -- I didn't know about mock objects, and this is good to know.
> But this doesn't feel like this is the solution I'm looking for. It's
> a large project, and your proposal would require extensive patching.
Does your project
Why doesn't setattr work? Just make sure you're setting the proper
option because apps often cache options at e.g. their 'config.py' file
in order to provide default values:
# captha_app/config.py
from django.conf import settings
CAPTCHA = getattr(settings, 'CAPTCHA', True)
So you'll have to
Thanks -- I didn't know about mock objects, and this is good to know.
But this doesn't feel like this is the solution I'm looking for. It's
a large project, and your proposal would require extensive patching.
Is the solution to create a new testrunner that sets a different
environment (with
On Feb 17, 12:03 pm, Cody Django wrote:
> For example, I have a captcha that is used in parts of a site that
> affects form logic.
> The django settings has a variable CAPTCHA = True, which acts as a
> switch.
>
> I'd like to change this setting in the setup for each
For example, I have a captcha that is used in parts of a site that
affects form logic.
The django settings has a variable CAPTCHA = True, which acts as a
switch.
I'd like to change this setting in the setup for each TestCase. The
regular unittests tests (in which we are assuming the captcha is
5 matches
Mail list logo