|
17 | 17 | import os |
18 | 18 |
|
19 | 19 | import fixtures |
20 | | -import sys |
21 | 20 | import testtools |
22 | 21 |
|
23 | 22 | from openstackclient.tests import fakes |
@@ -50,29 +49,6 @@ def assertNotCalled(self, m, msg=None): |
50 | 49 | msg = 'method %s should not have been called' % m |
51 | 50 | self.fail(msg) |
52 | 51 |
|
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 | | - |
76 | 52 |
|
77 | 53 | class TestCommand(TestCase): |
78 | 54 | """Test cliff command classes""" |
|
0 commit comments