Use testtools instead of unittest or unittest2.

As part of the move towards testr and parallel test running, we
start to use testtools and fixtures to make the test suite
resilient and more pedantic.

Part of blueprint grizzly-testtools

Change-Id: I90250de9fe21237db34f6a50b89b15863e270aa5
This commit is contained in:
Monty Taylor 2013-02-06 17:01:30 +11:00 committed by Akihiro MOTOKI
parent 773a0e3ca5
commit 5a6f89265b
3 changed files with 9 additions and 3 deletions

View File

@ -66,9 +66,9 @@ Example::
import random
import StringIO
import time
import unittest
import eventlet
import testtools
import webob.exc
import quantum.api.networks
@ -199,6 +199,12 @@ bug that had no unit test, a new passing unit test should be added. If a
submitted bug fix does have a unit test, be sure to add a new one that fails
without the patch and passes with the patch.
All unittest classes must ultimately inherit from testtools.TestCase.
All setUp and tearDown methods must upcall using the super() method.
tearDown methods should be avoided and addCleanup calls should be preferred.
Never manually create tempfiles. Always use the tempfile fixtures from
the fixture library to ensure that they are cleaned up.
openstack-common
----------------

View File

@ -9,7 +9,6 @@ source-dir = doc/source
# tissue http://pypi.python.org/pypi/tissue (pep8 checker)
# openstack-nose https://github.com/jkoelker/openstack-nose
verbosity=2
detailed-errors=1
cover-package = quantum
cover-html = true
cover-erase = true

View File

@ -2,6 +2,7 @@ Babel>=0.9.6
cliff
coverage
distribute>=0.6.24
fixtures>=0.3.12
mock>=1.0b1
mox==0.5.3
nose
@ -10,7 +11,7 @@ nosexcover
openstack.nose_plugin
pep8
sphinx>=1.1.2
unittest2
testtools>=0.9.27
webtest==1.3.3
# Packages for the Cisco Plugin
###############################