diff --git a/quincy/api.py b/quincy/api.py index 6dc8dda..8e35b4a 100644 --- a/quincy/api.py +++ b/quincy/api.py @@ -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) diff --git a/requirements.txt b/requirements.txt index 657218c..b3e647d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ falcon -json simport >= 0.0.dev0 diff --git a/tox.ini b/tox.ini index e869052..ee14a0b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,6 @@ envlist = py26,py27 [testenv] deps = falcon - json coverage nose mock