Example #1
0
 def setUp(self):
     self.paginator_config = {}
     self.paginator_config['pagination'] = {
         'ListFoos': {
             'output_token': 'NextToken',
             'input_token': 'NextToken',
             'result_key': 'Foo'
         }
     }
     self.paginator_model = PaginatorModel(self.paginator_config)
Example #2
0
 def setUp(self):
     self.paginator_config = {}
     self.paginator_config['pagination'] = {
         'ListFoos': {
             'output_token': 'NextToken',
             'input_token': 'NextToken',
             'result_key': 'Foo'
         }
     }
     self.paginator_model = PaginatorModel(self.paginator_config)
Example #3
0
class TestPaginatorModel(unittest.TestCase):
    def setUp(self):
        self.paginator_config = {}
        self.paginator_config['pagination'] = {
            'ListFoos': {
                'output_token': 'NextToken',
                'input_token': 'NextToken',
                'result_key': 'Foo'
            }
        }
        self.paginator_model = PaginatorModel(self.paginator_config)

    def test_get_paginator(self):
        paginator_config = self.paginator_model.get_paginator('ListFoos')
        self.assertEqual(
            paginator_config,
            {'output_token': 'NextToken', 'input_token': 'NextToken',
             'result_key': 'Foo'}
        )

    def test_get_paginator_no_exists(self):
        with self.assertRaises(ValueError):
            paginator_config = self.paginator_model.get_paginator('ListBars')
Example #4
0
class TestPaginatorModel(unittest.TestCase):
    def setUp(self):
        self.paginator_config = {}
        self.paginator_config['pagination'] = {
            'ListFoos': {
                'output_token': 'NextToken',
                'input_token': 'NextToken',
                'result_key': 'Foo'
            }
        }
        self.paginator_model = PaginatorModel(self.paginator_config)

    def test_get_paginator(self):
        paginator_config = self.paginator_model.get_paginator('ListFoos')
        self.assertEqual(
            paginator_config, {
                'output_token': 'NextToken',
                'input_token': 'NextToken',
                'result_key': 'Foo'
            })

    def test_get_paginator_no_exists(self):
        with self.assertRaises(ValueError):
            paginator_config = self.paginator_model.get_paginator('ListBars')
 def extra_setup(self):
     self.setup_client()
     paginator_model = PaginatorModel(self.paginator_json_model)
     self.paginator_documenter = PaginatorDocumenter(
         client=self.client, service_paginator_model=paginator_model)