boto/boto — pull request #1654 by danielgtaylor (2013-08-05 21:38:30+00:00)
Title: [EC2] Allow arbitrary regions in connect_to_region

This request merges #1616 from @cjellick as well as the following:

1. Remove trailing whitespace / PEP8
1. Check whether `region` exists in kw_params before trying to use it, and make sure it's an instance of `RegionInfo`
1. Add tests for `boto.ec2.connect_to_region(...)` behavior given various options

The new tests borrow a little bit of functionality from `AWSMockServiceTestCase`, but probably not enough to warrant refactoring that code to make it work for these cases.