enable hacking check H234
assertEquals() logs a DeprecationWarning in Python 3.x, use assertEqual() instead. The same goes for assertNotEquals(). Change-Id: I73de77fe6a4c844856a9e15d5726dffcc8299734
This commit is contained in:
parent
5140ff5795
commit
ee17d849dd
@ -45,16 +45,16 @@ class TestControllerV1(base.TestCase):
|
|||||||
|
|
||||||
def test_v1_namespace_controller_factory__memory(self):
|
def test_v1_namespace_controller_factory__memory(self):
|
||||||
rc = NSDAOFactory.create('memory')
|
rc = NSDAOFactory.create('memory')
|
||||||
self.assertEquals(rc.get_type(), 'MemNSDAO')
|
self.assertEqual(rc.get_type(), 'MemNSDAO')
|
||||||
|
|
||||||
# TODO(Lakshmi): Create folder before any tests run
|
# TODO(Lakshmi): Create folder before any tests run
|
||||||
# def test_v1_namespace_controller_factory__file(self):
|
# def test_v1_namespace_controller_factory__file(self):
|
||||||
# rc = NSControllerFactory.create('file')
|
# rc = NSControllerFactory.create('file')
|
||||||
# self.assertEquals(rc.get_type(), 'FileNSDAO')
|
# self.assertEqual(rc.get_type(), 'FileNSDAO')
|
||||||
|
|
||||||
def test_v1_namespace_controller_factory__db(self):
|
def test_v1_namespace_controller_factory__db(self):
|
||||||
rc = NSDAOFactory.create('db')
|
rc = NSDAOFactory.create('db')
|
||||||
self.assertEquals(rc.get_type(), 'DBNSDAO')
|
self.assertEqual(rc.get_type(), 'DBNSDAO')
|
||||||
|
|
||||||
def test_v1_capability_type_exists(self):
|
def test_v1_capability_type_exists(self):
|
||||||
v1 = V1Controller()
|
v1 = V1Controller()
|
||||||
@ -62,16 +62,16 @@ class TestControllerV1(base.TestCase):
|
|||||||
|
|
||||||
def test_v1_capability_type_dao_factory__memory(self):
|
def test_v1_capability_type_dao_factory__memory(self):
|
||||||
rc = CapabilityTypeDAOFactory.create('memory')
|
rc = CapabilityTypeDAOFactory.create('memory')
|
||||||
self.assertEquals(rc.get_type(), 'MemCapabilityTypeDAO')
|
self.assertEqual(rc.get_type(), 'MemCapabilityTypeDAO')
|
||||||
|
|
||||||
# TODO(Lakshmi): Create folder before any tests run
|
# TODO(Lakshmi): Create folder before any tests run
|
||||||
# def test_v1_capability_type_dao_factory__file(self):
|
# def test_v1_capability_type_dao_factory__file(self):
|
||||||
# rc = CapabilityTypeDAOFactory.create('file')
|
# rc = CapabilityTypeDAOFactory.create('file')
|
||||||
# self.assertEquals(rc.get_type(), 'FileCapabilityTypeDAO')
|
# self.assertEqual(rc.get_type(), 'FileCapabilityTypeDAO')
|
||||||
|
|
||||||
def test_v1_capability_type_dao_factory__db(self):
|
def test_v1_capability_type_dao_factory__db(self):
|
||||||
rc = CapabilityTypeDAOFactory.create('db')
|
rc = CapabilityTypeDAOFactory.create('db')
|
||||||
self.assertEquals(rc.get_type(), 'DBCapabilityTypeDAO')
|
self.assertEqual(rc.get_type(), 'DBCapabilityTypeDAO')
|
||||||
|
|
||||||
def test_v1_resource_exists(self):
|
def test_v1_resource_exists(self):
|
||||||
v1 = V1Controller()
|
v1 = V1Controller()
|
||||||
@ -79,15 +79,15 @@ class TestControllerV1(base.TestCase):
|
|||||||
|
|
||||||
def test_v1_resource_dao_factory__memory(self):
|
def test_v1_resource_dao_factory__memory(self):
|
||||||
rc = ResourceDAOFactory.create('memory')
|
rc = ResourceDAOFactory.create('memory')
|
||||||
self.assertEquals(rc.get_type(), 'MemResourceDAO')
|
self.assertEqual(rc.get_type(), 'MemResourceDAO')
|
||||||
|
|
||||||
def test_v1_resource_dao_factory__file(self):
|
def test_v1_resource_dao_factory__file(self):
|
||||||
rc = ResourceDAOFactory.create('file')
|
rc = ResourceDAOFactory.create('file')
|
||||||
self.assertEquals(rc.get_type(), 'FileResourceDAO')
|
self.assertEqual(rc.get_type(), 'FileResourceDAO')
|
||||||
|
|
||||||
def test_v1_resource_dao_factory__db(self):
|
def test_v1_resource_dao_factory__db(self):
|
||||||
rc = ResourceDAOFactory.create('db')
|
rc = ResourceDAOFactory.create('db')
|
||||||
self.assertEquals(rc.get_type(), 'DBResourceDAO')
|
self.assertEqual(rc.get_type(), 'DBResourceDAO')
|
||||||
|
|
||||||
def test_v1_resource_controller_factory__unknown(self):
|
def test_v1_resource_controller_factory__unknown(self):
|
||||||
rc = ResourceDAOFactory.create('invalid_controller')
|
rc = ResourceDAOFactory.create('invalid_controller')
|
||||||
|
1
tox.ini
1
tox.ini
@ -26,6 +26,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
|
||||||
show-source = True
|
show-source = True
|
||||||
|
select = H234
|
||||||
ignore = E123,E125,H803
|
ignore = E123,E125,H803
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||||
|
Loading…
Reference in New Issue
Block a user