Пример #1
0
 def test_s3_help(self):
     # This tests the help command for the s3 service. This
     # checks to make sure the appropriate descriptions are
     # added including the tutorial.
     s3 = S3('s3', self.session)
     parser = argparse.ArgumentParser()
     parser.add_argument('--paginate', action='store_true')
     parsed_global = parser.parse_args(['--paginate'])
     help_command = s3.create_help_command()
     help_command([], parsed_global)
     self.assert_contains("This provides higher level S3 commands")
     self.assert_contains("Every command takes one or two positional")
     self.assert_contains("* rb")
Пример #2
0
 def test_call(self):
     session = botocore.session.get_session()
     s3 = S3('s3', session, {'s3': self.mock})
     response = s3(['s3'], [])
     self.assertEqual(response, "test service")