pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

Override config in context manager?

Open carn1x opened this issue 8 years ago • 0 comments

Is there anyway to override config in a context manager, such as for individual unit tests? For instance:

class MyTestCase(TestCase):
    override_config('SMTP_SETTINGS', {'host': 'localhost'})
    def test_something(self):
        send_mail()

carn1x avatar Jul 27 '17 08:07 carn1x