
from tests import unittest
import itertools

import botocore.session


class TestKinesisListStreams(unittest.TestCase):
    def setUp(self):
        self.session = botocore.session.get_session()
        self.service = self.session.get_service('kinesis')
        self.endpoint = self.service.get_endpoint('us-east-1')

    def test_list_streams(self):
        operation = self.service.get_operation('ListStreams')
        http, parsed = operation.call(self.endpoint)
        self.assertEqual(http.status_code, 200)
        self.assertIn('StreamNames', parsed)


if __name__ == '__main__':
    unittest.main()

from tests import unittest

import botocore.session


class TestKinesisListStreams(unittest.TestCase):
    def setUp(self):
        self.session = botocore.session.get_session()
        self.client = self.session.create_client('kinesis', 'us-east-1')

    def test_list_streams(self):
        parsed = self.client.list_streams()
        self.assertIn('StreamNames', parsed)


if __name__ == '__main__':
    unittest.main()

Switch kinesis integ tests over to client interface
Switch kinesis integ tests over to client interface

- 
  from tests import unittest
- import itertools
  
  import botocore.session
  
  
  class TestKinesisListStreams(unittest.TestCase):
      def setUp(self):
          self.session = botocore.session.get_session()
+         self.client = self.session.create_client('kinesis', 'us-east-1')
-         self.service = self.session.get_service('kinesis')
-         self.endpoint = self.service.get_endpoint('us-east-1')
  
      def test_list_streams(self):
+         parsed = self.client.list_streams()
-         operation = self.service.get_operation('ListStreams')
-         http, parsed = operation.call(self.endpoint)
-         self.assertEqual(http.status_code, 200)
          self.assertIn('StreamNames', parsed)
  
  
  if __name__ == '__main__':
      unittest.main()
  
Switch kinesis integ tests over to client interface
## Code Before:

from tests import unittest
import itertools

import botocore.session


class TestKinesisListStreams(unittest.TestCase):
    def setUp(self):
        self.session = botocore.session.get_session()
        self.service = self.session.get_service('kinesis')
        self.endpoint = self.service.get_endpoint('us-east-1')

    def test_list_streams(self):
        operation = self.service.get_operation('ListStreams')
        http, parsed = operation.call(self.endpoint)
        self.assertEqual(http.status_code, 200)
        self.assertIn('StreamNames', parsed)


if __name__ == '__main__':
    unittest.main()

## Instruction:
Switch kinesis integ tests over to client interface
## Code After:
from tests import unittest

import botocore.session


class TestKinesisListStreams(unittest.TestCase):
    def setUp(self):
        self.session = botocore.session.get_session()
        self.client = self.session.create_client('kinesis', 'us-east-1')

    def test_list_streams(self):
        parsed = self.client.list_streams()
        self.assertIn('StreamNames', parsed)


if __name__ == '__main__':
    unittest.main()
