def METHOD_NAME(self):
    try:
        for environment_string, environment_object in braintree.Environment.All.items():
            braintree.Configuration.configure(
                environment_string,
                'my_merchant_id',
                'public_key',
                'private_key'
            )
            self.assertEqual(braintree.Configuration.environment, environment_object)
    finally:
        reset_braintree_configuration()