Skip to content

Commit 46f58dc

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "remove py26 workaround in osc"
2 parents 0713c03 + 3ed5d23 commit 46f58dc

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

openstackclient/tests/utils.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import os
1818

1919
import fixtures
20-
import sys
2120
import testtools
2221

2322
from openstackclient.tests import fakes
@@ -50,29 +49,6 @@ def assertNotCalled(self, m, msg=None):
5049
msg = 'method %s should not have been called' % m
5150
self.fail(msg)
5251

53-
# 2.6 doesn't have the assert dict equals so make sure that it exists
54-
if tuple(sys.version_info)[0:2] < (2, 7):
55-
56-
def assertIsInstance(self, obj, cls, msg=None):
57-
"""self.assertTrue(isinstance(obj, cls)), with a nicer message"""
58-
59-
if not isinstance(obj, cls):
60-
standardMsg = '%s is not an instance of %r' % (obj, cls)
61-
self.fail(self._formatMessage(msg, standardMsg))
62-
63-
def assertDictEqual(self, d1, d2, msg=None):
64-
# Simple version taken from 2.7
65-
self.assertIsInstance(d1, dict,
66-
'First argument is not a dictionary')
67-
self.assertIsInstance(d2, dict,
68-
'Second argument is not a dictionary')
69-
if d1 != d2:
70-
if msg:
71-
self.fail(msg)
72-
else:
73-
standardMsg = '%r != %r' % (d1, d2)
74-
self.fail(standardMsg)
75-
7652

7753
class TestCommand(TestCase):
7854
"""Test cliff command classes"""

0 commit comments

Comments
 (0)