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('/') ... However, if the setting BLAH exists, the call to delattr returns an "Attribute error: BLAH" error. I'm wondering if that's because the settings are lazily loaded. BTW, I'm using Python 2.5. Do you have a tip on how I could achieve this? Julien --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---