Skip to content

Commit

Permalink
style: Format test code style
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <xuanwo@yunify.com>
  • Loading branch information
Xuanwo committed Feb 28, 2017
1 parent 4ab4283 commit e26a6f6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def setUpClass(cls):
def test_parse_request_params(self):
test_params = self.test_builder.parse_request_params()
self.assertEqual(test_params['test_params_1'], 'test_val')
self.assertEqual(test_params['test_params_2'], '%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95')
self.assertEqual(
test_params['test_params_2'], '%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95'
)

def test_parse_request_headers(self):
test_headers = self.test_builder.parse_request_headers()
Expand All @@ -68,7 +70,10 @@ def test_parse_request_headers(self):
)
self.assertEqual(test_headers['Content-Type'], 'application/json')
self.assertEqual(test_headers['x-qs-test-header1'], 'test_val')
self.assertEqual(test_headers['x-qs-test-header2'], '%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95')
self.assertEqual(
test_headers['x-qs-test-header2'],
'%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95'
)

def test_parse_request_body(self):
test_body, is_json = self.test_builder.parse_request_body()
Expand All @@ -87,7 +92,10 @@ def test_parse_request_properties(self):
test_properties = self.test_builder.parse_request_properties()
self.assertEqual(test_properties['zone'], 'pek3a')
self.assertEqual(test_properties['bucket-name'], 'test_bucket')
self.assertEqual(test_properties['object-key'], '%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95.json')
self.assertEqual(
test_properties['object-key'],
'%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95.json'
)

def test_parss_request_uri(self):
test_uri = self.test_builder.parse_request_uri()
Expand Down

0 comments on commit e26a6f6

Please sign in to comment.