2424from osc_lib import exceptions
2525from osc_lib import utils as common_utils
2626from oslo_utils import timeutils
27- import six
2827
2928from openstackclient .compute .v2 import server
3029from openstackclient .tests .unit .compute .v2 import fakes as compute_fakes
@@ -1907,7 +1906,7 @@ def test_server_create_volume_boot_from_volume_conflict(self):
19071906 self .cmd .take_action , parsed_args )
19081907 # Assert it is the error we expect.
19091908 self .assertIn ('--volume is not allowed with --boot-from-volume' ,
1910- six . text_type (ex ))
1909+ str (ex ))
19111910
19121911 def test_server_create_image_property (self ):
19131912 arglist = [
@@ -3288,7 +3287,7 @@ def test_server_migrate_with_host_pre_2_56(self):
32883287 # Make sure it's the error we expect.
32893288 self .assertIn ('--os-compute-api-version 2.56 or greater is required '
32903289 'to use --host without --live-migration.' ,
3291- six . text_type (ex ))
3290+ str (ex ))
32923291
32933292 self .servers_mock .get .assert_called_with (self .server .id )
32943293 self .assertNotCalled (self .servers_mock .live_migrate )
@@ -3323,7 +3322,7 @@ def test_server_live_migrate(self):
33233322 # A warning should have been logged for using --live.
33243323 mock_warning .assert_called_once ()
33253324 self .assertIn ('The --live option has been deprecated.' ,
3326- six . text_type (mock_warning .call_args [0 ][0 ]))
3325+ str (mock_warning .call_args [0 ][0 ]))
33273326
33283327 def test_server_live_migrate_host_pre_2_30 (self ):
33293328 # Tests that the --host option is not supported for --live-migration
@@ -3346,7 +3345,7 @@ def test_server_live_migrate_host_pre_2_30(self):
33463345
33473346 # Make sure it's the error we expect.
33483347 self .assertIn ('--os-compute-api-version 2.30 or greater is required '
3349- 'when using --host' , six . text_type (ex ))
3348+ 'when using --host' , str (ex ))
33503349
33513350 self .servers_mock .get .assert_called_with (self .server .id )
33523351 self .assertNotCalled (self .servers_mock .live_migrate )
@@ -3436,7 +3435,7 @@ def test_server_live_migrate_without_host_override_live(self):
34363435 # A warning should have been logged for using --live.
34373436 mock_warning .assert_called_once ()
34383437 self .assertIn ('The --live option has been deprecated.' ,
3439- six . text_type (mock_warning .call_args [0 ][0 ]))
3438+ str (mock_warning .call_args [0 ][0 ]))
34403439
34413440 def test_server_live_migrate_live_and_host_mutex (self ):
34423441 # Tests specifying both the --live and --host options which are in a
@@ -4352,7 +4351,7 @@ def test_server_resize_confirm(self):
43524351 # A warning should have been logged for using --confirm.
43534352 mock_warning .assert_called_once ()
43544353 self .assertIn ('The --confirm option has been deprecated.' ,
4355- six . text_type (mock_warning .call_args [0 ][0 ]))
4354+ str (mock_warning .call_args [0 ][0 ]))
43564355
43574356 def test_server_resize_revert (self ):
43584357 arglist = [
@@ -4377,7 +4376,7 @@ def test_server_resize_revert(self):
43774376 # A warning should have been logged for using --revert.
43784377 mock_warning .assert_called_once ()
43794378 self .assertIn ('The --revert option has been deprecated.' ,
4380- six . text_type (mock_warning .call_args [0 ][0 ]))
4379+ str (mock_warning .call_args [0 ][0 ]))
43814380
43824381 @mock .patch .object (common_utils , 'wait_for_status' , return_value = True )
43834382 def test_server_resize_with_wait_ok (self , mock_wait_for_status ):
0 commit comments