summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJames Saryerwinnie <js@jamesls.com>2015-06-29 10:52:22 -0700
committerJames Saryerwinnie <js@jamesls.com>2015-06-29 10:52:22 -0700
commit5a4565304fa8ebb56645bb20e32c0019facfc1da (patch)
treec3fe7f75bb7ab84c5bda4d79e0903a1e5f10e11c /tests
parent2aaa0cad1a3c507450a994f3ebefb78a84c45fbf (diff)
downloadboto-5a4565304fa8ebb56645bb20e32c0019facfc1da.tar.gz
Add test for ECS connect_to_region()
Updated code to be consistent with how other connect_to_region() functions are implemented. Also added a unit test for this.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/ec2containerservice/__init__.py0
-rwxr-xr-xtests/unit/ec2containerservice/test_connection.py33
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/unit/ec2containerservice/__init__.py b/tests/unit/ec2containerservice/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/unit/ec2containerservice/__init__.py
diff --git a/tests/unit/ec2containerservice/test_connection.py b/tests/unit/ec2containerservice/test_connection.py
new file mode 100755
index 00000000..6419e33f
--- /dev/null
+++ b/tests/unit/ec2containerservice/test_connection.py
@@ -0,0 +1,33 @@
+# Copyright (c) 2015 Amazon.com, Inc. or its affiliates.
+# All Rights Reserved
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish, dis-
+# tribute, sublicense, and/or sell copies of the Software, and to permit
+# persons to whom the Software is furnished to do so, subject to the fol-
+# lowing conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+from tests.unit import unittest
+
+import boto.ec2containerservice
+from boto.ec2containerservice.layer1 import EC2ContainerServiceConnection
+
+
+class TestConnectToRegion(unittest.TestCase):
+
+ def test_aws_region(self):
+ ecs = boto.ec2containerservice.connect_to_region('us-east-1')
+ self.assertIsInstance(ecs, EC2ContainerServiceConnection)