예제 #1
0
파일: models.py 프로젝트: zbrookle/moto
 def fake_boto3_client(*args, **kwargs):
     region = self._get_region(*args, **kwargs)
     if region:
         if "config" in kwargs:
             kwargs["config"].__dict__["user_agent_extra"] += " region/" + region
         else:
             config = Config(user_agent_extra="region/" + region)
             kwargs["config"] = config
     if "endpoint_url" not in kwargs:
         kwargs["endpoint_url"] = "http://localhost:5000"
     return real_boto3_client(*args, **kwargs)
예제 #2
0
 def fake_boto3_client(*args, **kwargs):
     region = self._get_region(*args, **kwargs)
     if region:
         if "config" in kwargs:
             kwargs["config"].__dict__["user_agent_extra"] += " region/" + region
         else:
             config = Config(user_agent_extra="region/" + region)
             kwargs["config"] = config
     if "endpoint_url" not in kwargs:
         kwargs["endpoint_url"] = self.test_server_mode_endpoint
     return real_boto3_client(*args, **kwargs)
예제 #3
0
 def fake_boto3_client(*args, **kwargs):
     if 'endpoint_url' not in kwargs:
         kwargs['endpoint_url'] = "http://localhost:5000"
     return real_boto3_client(*args, **kwargs)
예제 #4
0
파일: models.py 프로젝트: copland/moto
 def fake_boto3_client(*args, **kwargs):
     if 'endpoint_url' not in kwargs:
         kwargs['endpoint_url'] = "http://localhost:5000"
     return real_boto3_client(*args, **kwargs)