From a963904484fbc085ff81d61c77bb3c51262c1d4b Mon Sep 17 00:00:00 2001 From: Lakshmi N Sampath Date: Tue, 11 Mar 2014 16:20:51 -0700 Subject: [PATCH] Removing files not required in this directory Change-Id: I91e449849a71ca47841a5e50143dcf0238496e65 --- graffiti/api/controllers/root.py | 2 +- graffiti/api/controllers/v1/resource.py | 2 +- graffiti/api/controllers/versions.py | 2 +- graffiti/api/model/v1/capability.py | 2 +- graffiti/api/model/v1/resource.py | 8 ++-- graffiti/api/tests/test_controller_v1.py | 6 +-- graffiti/api/tests/test_graffiti.py | 2 +- graffiti/app.py | 41 ---------------- graffiti/controllers/__init__.py | 0 graffiti/controllers/root.py | 33 ------------- graffiti/controllers/v1/__init__.py | 0 graffiti/controllers/v1/resource.py | 59 ------------------------ graffiti/controllers/versions.py | 21 --------- graffiti/hooks.py | 36 --------------- graffiti/model/__init__.py | 18 -------- graffiti/model/v1/__init__.py | 0 graffiti/model/v1/capability.py | 31 ------------- graffiti/model/v1/property.py | 27 ----------- graffiti/model/v1/provider.py | 26 ----------- graffiti/model/v1/requirement.py | 29 ------------ graffiti/model/v1/resource.py | 40 ---------------- graffiti/service.py | 25 ---------- graffiti/tests/__init__.py | 14 ------ graffiti/tests/base.py | 53 --------------------- graffiti/tests/test_controller_v1.py | 39 ---------------- graffiti/tests/test_graffiti.py | 29 ------------ 26 files changed, 12 insertions(+), 533 deletions(-) delete mode 100644 graffiti/app.py delete mode 100644 graffiti/controllers/__init__.py delete mode 100644 graffiti/controllers/root.py delete mode 100644 graffiti/controllers/v1/__init__.py delete mode 100644 graffiti/controllers/v1/resource.py delete mode 100644 graffiti/controllers/versions.py delete mode 100644 graffiti/hooks.py delete mode 100644 graffiti/model/__init__.py delete mode 100644 graffiti/model/v1/__init__.py delete mode 100644 graffiti/model/v1/capability.py delete mode 100644 graffiti/model/v1/property.py delete mode 100644 graffiti/model/v1/provider.py delete mode 100644 graffiti/model/v1/requirement.py delete mode 100644 graffiti/model/v1/resource.py delete mode 100644 graffiti/service.py delete mode 100644 graffiti/tests/__init__.py delete mode 100644 graffiti/tests/base.py delete mode 100644 graffiti/tests/test_controller_v1.py delete mode 100644 graffiti/tests/test_graffiti.py diff --git a/graffiti/api/controllers/root.py b/graffiti/api/controllers/root.py index 1a7c46c..673dfb4 100644 --- a/graffiti/api/controllers/root.py +++ b/graffiti/api/controllers/root.py @@ -16,7 +16,7 @@ from pecan import expose from webob.exc import status_map -from graffiti.controllers.versions import V1Controller +from graffiti.api.controllers.versions import V1Controller class RootController(object): diff --git a/graffiti/api/controllers/v1/resource.py b/graffiti/api/controllers/v1/resource.py index 3fab585..88d72ca 100644 --- a/graffiti/api/controllers/v1/resource.py +++ b/graffiti/api/controllers/v1/resource.py @@ -18,7 +18,7 @@ from pecan.rest import RestController from wsme.api import Response from wsmeext.pecan import wsexpose -from graffiti.model.v1.resource import Resource +from graffiti.api.model.v1.resource import Resource import six diff --git a/graffiti/api/controllers/versions.py b/graffiti/api/controllers/versions.py index f2e297c..1e5e2f1 100644 --- a/graffiti/api/controllers/versions.py +++ b/graffiti/api/controllers/versions.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from graffiti.controllers.v1.resource import ResourceController +from graffiti.api.controllers.v1.resource import ResourceController class V1Controller(object): diff --git a/graffiti/api/model/v1/capability.py b/graffiti/api/model/v1/capability.py index b49d5b6..70ec434 100644 --- a/graffiti/api/model/v1/capability.py +++ b/graffiti/api/model/v1/capability.py @@ -16,7 +16,7 @@ import wsme from wsme import types -from graffiti.model.v1.property import Property +from graffiti.api.model.v1.property import Property class Capability(types.Base): diff --git a/graffiti/api/model/v1/resource.py b/graffiti/api/model/v1/resource.py index a5cf79a..7c2038b 100644 --- a/graffiti/api/model/v1/resource.py +++ b/graffiti/api/model/v1/resource.py @@ -16,10 +16,10 @@ import wsme from wsme import types -from graffiti.model.v1.capability import Capability -from graffiti.model.v1.property import Property -from graffiti.model.v1.provider import Provider -from graffiti.model.v1.requirement import Requirement +from graffiti.api.model.v1.capability import Capability +from graffiti.api.model.v1.property import Property +from graffiti.api.model.v1.provider import Provider +from graffiti.api.model.v1.requirement import Requirement class Resource(types.Base): diff --git a/graffiti/api/tests/test_controller_v1.py b/graffiti/api/tests/test_controller_v1.py index 81552e7..5dd8a54 100644 --- a/graffiti/api/tests/test_controller_v1.py +++ b/graffiti/api/tests/test_controller_v1.py @@ -20,10 +20,10 @@ test_controller_v1 Tests for `graffiti` module. """ -from graffiti.tests import base +from graffiti.api.tests import base -from graffiti.controllers.root import RootController -from graffiti.controllers.versions import V1Controller +from graffiti.api.controllers.root import RootController +from graffiti.api.controllers.versions import V1Controller class TestControllerV1(base.TestCase): diff --git a/graffiti/api/tests/test_graffiti.py b/graffiti/api/tests/test_graffiti.py index bf32d72..f72381d 100644 --- a/graffiti/api/tests/test_graffiti.py +++ b/graffiti/api/tests/test_graffiti.py @@ -20,7 +20,7 @@ test_graffiti Tests for `graffiti` module. """ -from graffiti.tests import base +from graffiti.api.tests import base class TestGraffiti(base.TestCase): diff --git a/graffiti/app.py b/graffiti/app.py deleted file mode 100644 index 25a2ff5..0000000 --- a/graffiti/app.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from pecan import make_app - -from graffiti import model -from graffiti.service import prepare_service - -from graffiti.hooks import CorsHook - -from oslo.config import cfg -CONF = cfg.CONF - - -def setup_app(config): - - model.init_model() - app_conf = dict(config.app) - - prepare_service() - - app_hooks = [CorsHook()] - - return make_app( - app_conf.pop('root'), - logging=getattr(config, 'logging', {}), - hooks=app_hooks, - **app_conf - ) diff --git a/graffiti/controllers/__init__.py b/graffiti/controllers/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/graffiti/controllers/root.py b/graffiti/controllers/root.py deleted file mode 100644 index 1a7c46c..0000000 --- a/graffiti/controllers/root.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from pecan import expose -from webob.exc import status_map - -from graffiti.controllers.versions import V1Controller - - -class RootController(object): - - v1 = V1Controller() - - @expose('error.html') - def error(self, status): - try: - status = int(status) - except ValueError: # pragma: no cover - status = 500 - message = getattr(status_map.get(status), 'explanation', '') - return dict(status=status, message=message) diff --git a/graffiti/controllers/v1/__init__.py b/graffiti/controllers/v1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/graffiti/controllers/v1/resource.py b/graffiti/controllers/v1/resource.py deleted file mode 100644 index 3fab585..0000000 --- a/graffiti/controllers/v1/resource.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from pecan.rest import RestController - -from wsme.api import Response -from wsmeext.pecan import wsexpose - -from graffiti.model.v1.resource import Resource - -import six - -resources = [] - - -class ResourceController(RestController): - def __init__(self): - super(ResourceController, self).__init__() - - self.status = 200 - - @wsexpose() - def options(): - pass - - @wsexpose(Resource, six.text_type) - def get_one(self, id): - global resources - - for res in resources: - if res.id.lower() == id.lower(): - return res - - res = Response(Resource(), status_code=404, error="Resource Not Found") - return res - - @wsexpose([Resource]) - def get_all(self): - global resources - - return resources - - @wsexpose(Resource, Resource) - def post(self, resource): - global resources - - resources.append(resource) diff --git a/graffiti/controllers/versions.py b/graffiti/controllers/versions.py deleted file mode 100644 index f2e297c..0000000 --- a/graffiti/controllers/versions.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from graffiti.controllers.v1.resource import ResourceController - - -class V1Controller(object): - - resource = ResourceController() diff --git a/graffiti/hooks.py b/graffiti/hooks.py deleted file mode 100644 index 389836c..0000000 --- a/graffiti/hooks.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json - -from pecan.hooks import PecanHook - - -class CorsHook(PecanHook): - def after(self, state): - state.response.headers['Access-Control-Allow-Origin'] = '*' - state.response.headers['Access-Control-Allow-Methods'] = \ - 'GET, PUT, POST, DELETE, OPTIONS' - state.response.headers['Access-Control-Allow-Headers'] = \ - 'origin, authorization, accept, content-type' - - if not state.response.headers['Content-Length']: - state.response.headers['Content-Length'] = \ - str(len(state.response.body)) - - if state.response.headers['Content-Type'].find('json') != -1: - # Sort the Response Body's JSON - json_str = json.loads(state.response.body) - state.response.body = json.dumps(json_str, sort_keys=True) diff --git a/graffiti/model/__init__.py b/graffiti/model/__init__.py deleted file mode 100644 index 5b68b9e..0000000 --- a/graffiti/model/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -def init_model(): - pass diff --git a/graffiti/model/v1/__init__.py b/graffiti/model/v1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/graffiti/model/v1/capability.py b/graffiti/model/v1/capability.py deleted file mode 100644 index b49d5b6..0000000 --- a/graffiti/model/v1/capability.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import wsme -from wsme import types - -from graffiti.model.v1.property import Property - - -class Capability(types.Base): - properties = wsme.wsattr([Property], mandatory=True) - capability_type = wsme.wsattr(types.text, mandatory=True) - capability_type_namespace = wsme.wsattr(types.text, mandatory=True) - - _wsme_attr_order = ('properties', 'capability_type', - 'capability_type_namespace') - - def __init__(self, **kwargs): - super(Capability, self).__init__(**kwargs) diff --git a/graffiti/model/v1/property.py b/graffiti/model/v1/property.py deleted file mode 100644 index 19126b8..0000000 --- a/graffiti/model/v1/property.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import wsme -from wsme import types - - -class Property(types.Base): - name = wsme.wsattr(types.text, mandatory=True) - value = wsme.wsattr(types.text, mandatory=True) - - _wsme_attr_order = ('name', 'value') - - def __init__(self, **kwargs): - super(Property, self).__init__(**kwargs) diff --git a/graffiti/model/v1/provider.py b/graffiti/model/v1/provider.py deleted file mode 100644 index 77f8457..0000000 --- a/graffiti/model/v1/provider.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import wsme -from wsme import types - - -class Provider(types.Base): - id = wsme.wsattr(types.text, mandatory=True) - - _wsme_attr_order = ('id',) - - def __init__(self, **kwargs): - super(Provider, self).__init__(**kwargs) diff --git a/graffiti/model/v1/requirement.py b/graffiti/model/v1/requirement.py deleted file mode 100644 index c140648..0000000 --- a/graffiti/model/v1/requirement.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import wsme -from wsme import types - - -class Requirement(types.Base): - criterion = wsme.wsattr(types.text, mandatory=True) - capability_type = wsme.wsattr(types.text, mandatory=True) - capability_type_namespace = wsme.wsattr(types.text, mandatory=True) - - _wsme_attr_order = ('criterion', 'capability_type', - 'capability_type_namespace') - - def __init__(self, **kwargs): - super(Requirement, self).__init__(**kwargs) diff --git a/graffiti/model/v1/resource.py b/graffiti/model/v1/resource.py deleted file mode 100644 index a5cf79a..0000000 --- a/graffiti/model/v1/resource.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import wsme -from wsme import types - -from graffiti.model.v1.capability import Capability -from graffiti.model.v1.property import Property -from graffiti.model.v1.provider import Provider -from graffiti.model.v1.requirement import Requirement - - -class Resource(types.Base): - id = wsme.wsattr(types.text, mandatory=True) - type = wsme.wsattr(types.text, mandatory=True) - name = wsme.wsattr(types.text, mandatory=True) - description = wsme.wsattr(types.text, mandatory=False) - provider = wsme.wsattr(Provider, mandatory=True) - properties = wsme.wsattr([Property], mandatory=False) - capabilities = wsme.wsattr([Capability], mandatory=True) - requirements = wsme.wsattr([Requirement], mandatory=True) - - _wsme_attr_order = ('id', 'name', 'description', 'type', - 'provider', 'properties', 'capabilities', - 'requirements') - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) diff --git a/graffiti/service.py b/graffiti/service.py deleted file mode 100644 index 1cacfe5..0000000 --- a/graffiti/service.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys - -from oslo.config import cfg - - -def prepare_service(argv=None): - if argv is None: - argv = sys.argv - - cfg.CONF(argv[3:], project='graffiti') diff --git a/graffiti/tests/__init__.py b/graffiti/tests/__init__.py deleted file mode 100644 index 7a15b4a..0000000 --- a/graffiti/tests/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/graffiti/tests/base.py b/graffiti/tests/base.py deleted file mode 100644 index 6e93268..0000000 --- a/graffiti/tests/base.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright 2010-2011 OpenStack Foundation -# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import os - -import fixtures -import testtools - -_TRUE_VALUES = ('True', 'true', '1', 'yes') - - -class TestCase(testtools.TestCase): - - """Test case base class for all unit tests.""" - - def setUp(self): - """Run before each test method to initialize test environment.""" - - super(TestCase, self).setUp() - test_timeout = os.environ.get('OS_TEST_TIMEOUT', 0) - try: - test_timeout = int(test_timeout) - except ValueError: - # If timeout value is invalid do not set a timeout. - test_timeout = 0 - if test_timeout > 0: - self.useFixture(fixtures.Timeout(test_timeout, gentle=True)) - - self.useFixture(fixtures.NestedTempfile()) - self.useFixture(fixtures.TempHomeDir()) - - if os.environ.get('OS_STDOUT_CAPTURE') in _TRUE_VALUES: - stdout = self.useFixture(fixtures.StringStream('stdout')).stream - self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout)) - if os.environ.get('OS_STDERR_CAPTURE') in _TRUE_VALUES: - stderr = self.useFixture(fixtures.StringStream('stderr')).stream - self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr)) - - self.log_fixture = self.useFixture(fixtures.FakeLogger()) diff --git a/graffiti/tests/test_controller_v1.py b/graffiti/tests/test_controller_v1.py deleted file mode 100644 index 81552e7..0000000 --- a/graffiti/tests/test_controller_v1.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -test_controller_v1 ----------------------------------- - -Tests for `graffiti` module. -""" - -from graffiti.tests import base - -from graffiti.controllers.root import RootController -from graffiti.controllers.versions import V1Controller - - -class TestControllerV1(base.TestCase): - - def test_v1_exists(self): - root = RootController() - self.assertIn(hasattr(root, 'v1'), [True]) - pass - - def test_v1_resource_exists(self): - v1 = V1Controller() - self.assertIn(hasattr(v1, 'resource'), [True]) - pass diff --git a/graffiti/tests/test_graffiti.py b/graffiti/tests/test_graffiti.py deleted file mode 100644 index bf32d72..0000000 --- a/graffiti/tests/test_graffiti.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -test_graffiti ----------------------------------- - -Tests for `graffiti` module. -""" - -from graffiti.tests import base - - -class TestGraffiti(base.TestCase): - - def test_something(self): - pass