コード例 #1
0
 def test_row_wrapper__lengthy_resource_status(self):
     string_width_mappings = [
         {
             'string': '2018-08-12 18:36:42',
             'width': 19
         },
         {
             'string': 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS',
             'width': 35
         },
         {
             'string':
             'ServerlessRestApiDeployment47fc2d5f9d (AWS::ApiGateway::Deployment)\n'
             'The API gateway, ServerlessRestApiDeployment47fc2d5f9d, was successfully built',
             'width':
             67
         },
     ]
     self.assertEqual([
         '2018-08-12 18:36:42   UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN   ServerlessRestApiDeployment47fc2d5f9d (AWS::ApiGateway::Deployment)',
         '                      _PROGRESS                             The API gateway, ServerlessRestApiDeployment47fc2d5f9d, was        ',
         '                                                            successfully built                                                 '
     ], utils.row_wrapper(string_width_mappings))
コード例 #2
0
 def test_row_wrapper(self):
     string_width_mappings = [
         {
             'string': '2018-08-12 18:36:42',
             'width': 19
         },
         {
             'string': 'CREATE_COMPLETE',
             'width': 35
         },
         {
             'string':
             'ServerlessRestApiDeployment47fc2d5f9d (AWS::ApiGateway::Deployment)\n'
             'The API gateway, ServerlessRestApiDeployment47fc2d5f9d, was successfully built',
             'width':
             67
         },
     ]
     self.assertEqual([
         '2018-08-12 18:36:42   CREATE_COMPLETE                       ServerlessRestApiDeployment47fc2d5f9d (AWS::ApiGateway::Deployment)',
         '                                                            The API gateway, ServerlessRestApiDeployment47fc2d5f9d, was        ',
         '                                                            successfully built                                                 '
     ], utils.row_wrapper(string_width_mappings))