you can run ./manage.py test yourapp with --settings=mysetting
so, I would recommend to create a settings file with the given setting
left out
V
On Jun 7, 1:51 pm, Julien Phalip wrote:
> Hi,
>
> In a unit test, I'd like to test the behaviour of a middleware in the
> absence of a setting. To ma
On Sun, Jun 7, 2009 at 7:51 AM, Julien Phalip wrote:
>
> Hi,
>
> In a unit test, I'd like to test the behaviour of a middleware in the
> absence of a setting. To make sure the setting is not present, I try
> to delete it:
>
> def test_middleware(self):
>if hasattr(settings, 'BLAH'):
>
Hi,
In a unit test, I'd like to test the behaviour of a middleware in the
absence of a setting. To make sure the setting is not present, I try
to delete it:
def test_middleware(self):
if hasattr(settings, 'BLAH'):
delattr(settings, 'BLAH')
response = self.client.get('
3 matches
Mail list logo