Replace assertEqual(None, *) with assertIsNone in tests

Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I5ef78693999f9bd87cc3ea8419e6e62027076383
Closes-Bug:#1280522
This commit is contained in:
llg8212 2014-02-15 12:09:02 +08:00
parent 64f0310042
commit ec1a3dabde
1 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import unittest
import testtools
from wsme import types as wtypes
@ -20,7 +20,7 @@ from tuskar.api.controllers.v1 import models as api_models
from tuskar.db.sqlalchemy import models as db_models
class BaseTests(unittest.TestCase):
class BaseTests(testtools.TestCase):
def test_lookup(self):
# Setup
@ -32,10 +32,10 @@ class BaseTests(unittest.TestCase):
# Test
self.assertEqual(1, stub._lookup('a1'))
self.assertEqual(None, stub._lookup('a2'))
self.assertIsNone(stub._lookup('a2'))
class OvercloudModelTests(unittest.TestCase):
class OvercloudModelTests(testtools.TestCase):
def test_from_db_model(self):
# Setup