well, it loads anyway

This commit is contained in:
Sandy Walsh 2014-06-09 22:55:44 -03:00
parent 45564ce45d
commit 6917406489
3 changed files with 5 additions and 7 deletions

View File

@ -32,7 +32,7 @@ def _load_implementations(impl_map, versions, config):
impl_map[version] = klass()
def _initialize(self, enabled_versions, implementation_map):
def _initialize(enabled_versions, implementation_map):
# The de facto set of supported versions.
versions = {1: v1_api.Schema,
2: v2_api.Schema}
@ -40,13 +40,13 @@ def _initialize(self, enabled_versions, implementation_map):
api = falcon.API()
routes = []
for version in enabled_version:
for version in enabled_versions:
klass = versions[version]
impl = implementation_map.get(version)
if not impl:
raise NotImplemented("No implementation available for Quincy"
" version %d" % version)
routes.append(klass(api, impl))
routes.append(klass(version, api, impl))
# TODO(sandy): We need to create the /v1
# ...
@ -63,8 +63,8 @@ if __name__ == '__main__':
# The default implementation is internal and works with
# a fake/static set of data.
local_config = {'v1_impl': 'v1_impl.Impl',
'v2_impl': 'v2_impl.Impl'}
local_config = {'v1_impl': 'v1_impl:Impl',
'v2_impl': 'v2_impl:Impl'}
impl_map = {}
_load_implementations(impl_map, enabled_versions, local_config)

View File

@ -1,3 +1,2 @@
falcon
json
simport >= 0.0.dev0

View File

@ -4,7 +4,6 @@ envlist = py26,py27
[testenv]
deps =
falcon
json
coverage
nose
mock