Browse Source

Merge "Correct the order of parameters in assertEqual()"

tags/4.0.0.0b1
Jenkins 2 years ago
parent
commit
781d7d9e3b
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      manila/tests/data/test_utils.py

+ 4
- 4
manila/tests/data/test_utils.py View File

@@ -116,7 +116,7 @@ class CopyClassTestCase(test.TestCase):
116 116
         self._copy.cancel()
117 117
 
118 118
         # asserts
119
-        self.assertEqual(self._copy.cancelled, True)
119
+        self.assertTrue(self._copy.cancelled)
120 120
 
121 121
         # reset
122 122
         self._copy.cancelled = False
@@ -139,7 +139,7 @@ class CopyClassTestCase(test.TestCase):
139 139
         self._copy.get_total_size(self._copy.src)
140 140
 
141 141
         # asserts
142
-        self.assertEqual(self._copy.total_size, 10000)
142
+        self.assertEqual(10000, self._copy.total_size)
143 143
 
144 144
         utils.execute.assert_has_calls([
145 145
             mock.call("ls", "-pA1", "--group-directories-first",
@@ -159,7 +159,7 @@ class CopyClassTestCase(test.TestCase):
159 159
         self._copy.get_total_size(self._copy.src)
160 160
 
161 161
         # asserts
162
-        self.assertEqual(self._copy.total_size, 0)
162
+        self.assertEqual(0, self._copy.total_size)
163 163
 
164 164
         # reset
165 165
         self._copy.total_size = 10000
@@ -180,7 +180,7 @@ class CopyClassTestCase(test.TestCase):
180 180
         self._copy.get_total_size(self._copy.src)
181 181
 
182 182
         # asserts
183
-        self.assertEqual(self._copy.total_size, 0)
183
+        self.assertEqual(0, self._copy.total_size)
184 184
         utils.execute.assert_called_once_with(
185 185
             "ls", "-pA1", "--group-directories-first", self._copy.src,
186 186
             run_as_root=True)

Loading…
Cancel
Save