Correct the order of parameters in assertEqual()
The order of parameters should be assertEqual(expected,actual). Change-Id: Iff0e3faca3edf898acbe96c23fa8965240369359
This commit is contained in:
parent
e65112f49c
commit
1c6bd035c2
@ -43,7 +43,7 @@ class TestCORSMiddleware(functional.FunctionalTest):
|
||||
'Access-Control-Request-Method': 'GET'
|
||||
})
|
||||
|
||||
self.assertEqual(r_headers.status, 200)
|
||||
self.assertEqual(200, r_headers.status)
|
||||
self.assertIn('access-control-allow-origin', r_headers)
|
||||
self.assertEqual('http://valid.example.com',
|
||||
r_headers['access-control-allow-origin'])
|
||||
@ -57,7 +57,7 @@ class TestCORSMiddleware(functional.FunctionalTest):
|
||||
'Access-Control-Request-Method': 'GET'
|
||||
})
|
||||
|
||||
self.assertEqual(r_headers.status, 200)
|
||||
self.assertEqual(200, r_headers.status)
|
||||
self.assertNotIn('access-control-allow-origin', r_headers)
|
||||
|
||||
def test_valid_cors_get_request(self):
|
||||
@ -68,7 +68,7 @@ class TestCORSMiddleware(functional.FunctionalTest):
|
||||
'Origin': 'http://valid.example.com'
|
||||
})
|
||||
|
||||
self.assertEqual(r_headers.status, 200)
|
||||
self.assertEqual(200, r_headers.status)
|
||||
self.assertIn('access-control-allow-origin', r_headers)
|
||||
self.assertEqual('http://valid.example.com',
|
||||
r_headers['access-control-allow-origin'])
|
||||
@ -81,5 +81,5 @@ class TestCORSMiddleware(functional.FunctionalTest):
|
||||
'Origin': 'http://invalid.example.com'
|
||||
})
|
||||
|
||||
self.assertEqual(r_headers.status, 200)
|
||||
self.assertEqual(200, r_headers.status)
|
||||
self.assertNotIn('access-control-allow-origin', r_headers)
|
||||
|
Loading…
Reference in New Issue
Block a user