Add skeleton test framework
This commit is contained in:
parent
76dc41b11b
commit
829ad53ed1
|
@ -0,0 +1,27 @@
|
|||
# Copyright 2012 Managed I.T.
|
||||
#
|
||||
# Author: Kiall Mac Innes <kiall@managedit.ie>
|
||||
#
|
||||
# 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 unittest
|
||||
import mox
|
||||
|
||||
|
||||
class TestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
super(TestCase, self).setUp()
|
||||
self.mox = mox.Mox()
|
||||
|
||||
def tearDown(self):
|
||||
self.mox.UnsetStubs()
|
||||
super(TestCase, self).tearDown()
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright 2012 Managed I.T.
|
||||
#
|
||||
# Author: Kiall Mac Innes <kiall@managedit.ie>
|
||||
#
|
||||
# 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 moniker.tests import TestCase
|
||||
|
||||
|
||||
class ServiceTest(TestCase):
|
||||
def test_something(self):
|
||||
assert(True)
|
|
@ -5,4 +5,4 @@ cover-erase=true
|
|||
cover-inclusive=true
|
||||
verbosity=2
|
||||
detailed-errors=1
|
||||
where=tests
|
||||
where=moniker/tests
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
nose
|
||||
mox
|
||||
coverage
|
||||
pep8>=1.0
|
||||
setuptools-git>=0.4
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -10,12 +10,12 @@ setenv = VIRTUAL_ENV={envdir}
|
|||
NOSE_OPENSTACK_RED=0.05
|
||||
NOSE_OPENSTACK_YELLOW=0.025
|
||||
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
||||
commands = {toxinidir}/run_tests.sh --no-path-adjustment []
|
||||
commands = nosetests --no-path-adjustment []
|
||||
sitepackages = True
|
||||
|
||||
[testenv:cover]
|
||||
commands = {toxinidir}/run_tests.sh --no-path-adjustment --with-coverage --cover-erase --cover-package=moniker --cover-inclusive []
|
||||
commands = nosetests --no-path-adjustment --with-coverage --cover-erase --cover-package=moniker --cover-inclusive []
|
||||
|
||||
[testenv:pep8]
|
||||
deps = pep8==1.1
|
||||
commands = pep8 --repeat --show-source moniker setup.py bin/moniker-api
|
||||
commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack moniker setup.py bin/moniker-api
|
||||
|
|
Loading…
Reference in New Issue