Change validators to use the validator_context

Change InstanceKeys to take a namedtuple for context
This commit is contained in:
Sam Chow 2018-05-25 15:42:27 -04:00
parent e967fde3ae
commit 554d4f47a8
31 changed files with 172 additions and 69 deletions

View file

@ -7,7 +7,7 @@ from flask_testing import LiveServerTestCase
from initdb import setup_database_for_testing, finished_database_for_testing
from storage import Storage
from util.security.instancekeys import InstanceKeys
from util.security.instancekeys import InstanceKeys, instance_keys_context_from_app_config
_PORT_NUMBER = 5001
@ -42,7 +42,7 @@ class TestStorageProxy(LiveServerTestCase):
'test': ['FakeStorage', {}],
}
instance_keys = InstanceKeys(self.test_app)
instance_keys = InstanceKeys(instance_keys_context_from_app_config(self.test_app.config))
self.storage = Storage(self.test_app, instance_keys=instance_keys)
self.test_app.config['DISTRIBUTED_STORAGE_PREFERENCE'] = ['test']
return self.test_app