Fix order of arguments in assertEqual

Some tests used incorrect order assertEqual(observed, expected).

The correct order expected by testtools is
assertEqual(expected, observed).

This patch fix the issue in some test file of zaqarclient.
The review is generated part-wise to ease review process.
Partial-Bug: #1259292

Change-Id: I3f51e3a400d1c408e6c65b9ed503efd414b3d5ed
This commit is contained in:
MD NADEEM 2015-09-28 20:49:53 +09:00
parent bee843a033
commit 7adf35effc
2 changed files with 3 additions and 4 deletions

View File

@ -54,7 +54,7 @@ class TestKeystoneAuth(base.TestBase):
get_endpoint.return_value = test_endpoint
req = self.auth.authenticate(1, request.Request())
self.assertEqual(req.endpoint, test_endpoint)
self.assertEqual(test_endpoint, req.endpoint)
self.assertIn('X-Auth-Token', req.headers)
def test_with_token(self):

View File

@ -29,8 +29,7 @@ class TestRequest(base.TestBase):
}
}
req = request.prepare_request(auth_opts)
self.assertEqual(req.headers['X-Project-Id'],
'my-project')
self.assertEqual('my-project', req.headers['X-Project-Id'])
def test_prepare_request(self):
auth_opts = self.conf.get('auth_opts', {})
@ -43,4 +42,4 @@ class TestRequest(base.TestBase):
data = {"data": "tons of GBs"}
req = request.prepare_request(auth_opts, data=data)
self.assertTrue(isinstance(req, request.Request))
self.assertEqual(req.content, json.dumps(data))
self.assertEqual(json.dumps(data), req.content)