def client(): with override_settings(SENDABLE_EMAILS=[MY_SENDABLE_EMAIL], ROOT_URLCONF=__name__): yield Client()