Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(24)  |  Call(20)  |  Derive(0)  |  Import(4)

src/b/o/botocore-HEAD/tests/unit/test_session.py   botocore(Download)
# language governing permissions and limitations under the License.
 
from tests import unittest, create_session
import os
import logging
                                   'foo_config')
        self.environ['FOO_CONFIG_FILE'] = config_path
        self.session = create_session(session_vars=self.env_vars)
 
    def tearDown(self):
        saved_profile = self.environ['FOO_PROFILE']
        del self.environ['FOO_PROFILE']
        session = create_session(session_vars=self.env_vars)
        self.assertEqual(session.get_variable('profile'), None)
        self.assertEqual(session.get_variable('region'), 'us-west-1')
    def test_profile_does_not_exist_raises_exception(self):
        # Given we have no profile:
        self.environ['FOO_PROFILE'] = 'profile_that_does_not_exist'
        session = create_session(session_vars=self.env_vars)
        with self.assertRaises(botocore.exceptions.ProfileNotFound):
            session.get_config()
 
    def test_variable_does_not_exist(self):
        session = create_session(session_vars=self.env_vars)

src/b/o/botocore-HEAD/tests/unit/test_credentials.py   botocore(Download)
from botocore.vendored.requests import ConnectionError
 
from tests import unittest, BaseEnvVar, create_session
 
 
        self.environ['AWS_ACCESS_KEY_ID'] = 'foo'
        self.environ['AWS_SECRET_ACCESS_KEY'] = 'bar'
        self.session = create_session(session_vars=TESTENVVARS)
 
    def test_envvar(self):
    def setUp(self):
        super(CredentialsFileTest, self).setUp()
        self.environ['BOTO_CONFIG'] = ''
        self.session = create_session(session_vars=TESTENVVARS)
 
    def setUp(self):
        super(ConfigTest, self).setUp()
        self.environ['AWS_CONFIG_FILE'] = path('aws_config')
        self.environ['BOTO_CONFIG'] = ''
        self.session = create_session(session_vars=TESTENVVARS)
    def test_default_profile_is_obeyed(self):
        self.environ['BOTO_DEFAULT_PROFILE'] = 'personal'
        session = create_session()
        credentials = session.get_credentials()
        self.assertEqual(credentials.access_key, 'fie')

src/b/o/botocore-HEAD/tests/unit/test_endpoint.py   botocore(Download)
# language governing permissions and limitations under the License.
 
from tests import unittest, BaseSessionTest, create_session
 
from mock import Mock, patch, sentinel
    def setUp(self):
        super(TestRetryInterface, self).setUp()
        self.total_calls = 0
        self.auth = Mock()
        self.session = create_session(include_builtin_handlers=False)
    def setUp(self):
        super(TestResetStreamOnRetry, self).setUp()
        self.total_calls = 0
        self.auth = Mock()
        self.session = create_session(include_builtin_handlers=False)

src/b/o/botocore-HEAD/tests/unit/response_parsing/test_response_parsing.py   botocore(Download)
import logging
import difflib
from tests import unittest, create_session
 
from mock import Mock
def test_xml_parsing():
    for dp in ['responses', 'errors']:
        data_path = os.path.join(os.path.dirname(__file__), 'xml')
        data_path = os.path.join(data_path, dp)
        session = create_session()