Merge "Fix legacy tests using system policy.json file"

This commit is contained in:
Jenkins 2014-08-26 17:15:44 +00:00 committed by Gerrit Code Review
commit 640dd1ee89

View File

@ -123,6 +123,7 @@ class ApiTest(test_utils.BaseTestCase):
def init(self):
self.test_dir = self.useFixture(fixtures.TempDir()).path
self._configure_logging()
self._configure_policy()
self._setup_database()
self._setup_stores()
self._setup_property_protection()
@ -145,6 +146,10 @@ class ApiTest(test_utils.BaseTestCase):
self.property_file = os.path.join(self.test_dir,
'property-protections.conf')
def _configure_policy(self):
policy_file = self._copy_data_file('policy.json', self.test_dir)
self.config(policy_file=policy_file)
def _configure_logging(self):
self.config(default_log_levels=[
'amqplib=WARN',