Skip to content

Commit

Permalink
Add test that verifies a region is required with no endpoint_url
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesls committed Oct 22, 2013
1 parent b673285 commit 87f6d44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ def test_region_required_for_sigv4(self):
with self.assertRaises(botocore.exceptions.NoRegionError):
service.get_endpoint(endpoint_url='https://wherever.i.want.com')

def test_region_required_for_non_global_endpoint(self):
# If you don't provide an endpoint_url, than you need to
# provide a region_name.
service = self.session.get_service('ec2')
with self.assertRaises(botocore.exceptions.NoRegionError):
service.get_endpoint()


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

0 comments on commit 87f6d44

Please sign in to comment.