Replace unittest2 with testtools

Remove unittest2 from test-requirements.txt
Replace unittest2 with testtools in files:
* openstack_dashboard/test/api_tests/keystone_rest_tests.py
* openstack_dashboard/test/api_tests/rest_util_tests.py
* openstack_dashboard/test/api_tests/nova_rest_tests.py

Change-Id: Ic56b1096386548e8253e40cbd54ee5fc579cf413
Closes-Bug: #1179009
This commit is contained in:
Wu Wenxiang 2015-02-04 03:58:25 -08:00
parent c412502ede
commit 8e8c084847
4 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest2
import testtools
from django.conf import settings
@ -21,7 +21,7 @@ from openstack_dashboard.api.rest import keystone
from rest_test_utils import construct_request # noqa
class KeystoneRestTestCase(unittest2.TestCase):
class KeystoneRestTestCase(testtools.TestCase):
def assertStatusCode(self, response, expected_code):
if response.status_code == expected_code:
return

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest2
import testtools
from django.conf import settings
@ -21,7 +21,7 @@ from openstack_dashboard.api.rest import nova
from rest_test_utils import construct_request # noqa
class NovaRestTestCase(unittest2.TestCase):
class NovaRestTestCase(testtools.TestCase):
def assertStatusCode(self, response, expected_code):
if response.status_code == expected_code:
return

View File

@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest2
import testtools
from openstack_dashboard.api.rest import utils
class RestUtilsTestCase(unittest2.TestCase):
class RestUtilsTestCase(testtools.TestCase):
def assertStatusCode(self, response, expected_code):
if response.status_code == expected_code:
return

View File

@ -23,6 +23,5 @@ oslosphinx>=2.2.0 # Apache-2.0
selenium
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
testtools>=0.9.36,!=1.2.0
unittest2
# This also needs xvfb library installed on your OS
xvfbwrapper>=0.1.3 #license: MIT