Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: third_party/boto/tests/integration/opsworks/test_layer1.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved 1 # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved
2 # 2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a 3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the 4 # copy of this software and associated documentation files (the
5 # "Software"), to deal in the Software without restriction, including 5 # "Software"), to deal in the Software without restriction, including
6 # without limitation the rights to use, copy, modify, merge, publish, dis- 6 # without limitation the rights to use, copy, modify, merge, publish, dis-
7 # tribute, sublicense, and/or sell copies of the Software, and to permit 7 # tribute, sublicense, and/or sell copies of the Software, and to permit
8 # persons to whom the Software is furnished to do so, subject to the fol- 8 # persons to whom the Software is furnished to do so, subject to the fol-
9 # lowing conditions: 9 # lowing conditions:
10 # 10 #
11 # The above copyright notice and this permission notice shall be included 11 # The above copyright notice and this permission notice shall be included
12 # in all copies or substantial portions of the Software. 12 # in all copies or substantial portions of the Software.
13 # 13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 15 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
16 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 16 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
17 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE. 20 # IN THE SOFTWARE.
21 # 21 #
22 import unittest 22 import unittest
23 import time
24 23
25 from boto.exception import JSONResponseError 24 from boto.exception import JSONResponseError
25 from boto.opsworks import connect_to_region, regions, RegionInfo
26 from boto.opsworks.layer1 import OpsWorksConnection 26 from boto.opsworks.layer1 import OpsWorksConnection
27 27
28 28
29 class TestOpsWorksConnection(unittest.TestCase): 29 class TestOpsWorksConnection(unittest.TestCase):
30 opsworks = True
31
30 def setUp(self): 32 def setUp(self):
31 self.api = OpsWorksConnection() 33 self.api = OpsWorksConnection()
32 34
33 def test_describe_stacks(self): 35 def test_describe_stacks(self):
34 response = self.api.describe_stacks() 36 response = self.api.describe_stacks()
35 self.assertIn('Stacks', response) 37 self.assertIn('Stacks', response)
36 38
37 def test_validation_errors(self): 39 def test_validation_errors(self):
38 with self.assertRaises(JSONResponseError): 40 with self.assertRaises(JSONResponseError):
39 self.api.create_stack('testbotostack', 'us-east-1', 41 self.api.create_stack('testbotostack', 'us-east-1',
40 'badarn', 'badarn2') 42 'badarn', 'badarn2')
43
44
45 class TestOpsWorksHelpers(unittest.TestCase):
46 opsworks = True
47
48 def test_regions(self):
49 response = regions()
50 self.assertIsInstance(response[0], RegionInfo)
51
52 def test_connect_to_region(self):
53 connection = connect_to_region('us-east-1')
54 self.assertIsInstance(connection, OpsWorksConnection)
OLDNEW
« no previous file with comments | « third_party/boto/tests/integration/mws/test.py ('k') | third_party/boto/tests/integration/rds2/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698