text
stringlengths
0
828
:param async bool
:param str collection_id: ID of collection to replace (required)
:param Collection collection: Attributes of collection to replace (required)
:return: Collection
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._replace_collection_by_id_with_http_info(collection_id, collection, **kwargs)
else:
(data) = cls._replace_collection_by_id_with_http_info(collection_id, collection, **kwargs)
return data"
4399,"def update_collection_by_id(cls, collection_id, collection, **kwargs):
""""""Update Collection
Update attributes of Collection
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.update_collection_by_id(collection_id, collection, async=True)
>>> result = thread.get()
:param async bool
:param str collection_id: ID of collection to update. (required)
:param Collection collection: Attributes of collection to update. (required)
:return: Collection
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._update_collection_by_id_with_http_info(collection_id, collection, **kwargs)
else:
(data) = cls._update_collection_by_id_with_http_info(collection_id, collection, **kwargs)
return data"
4400,"def setupModule(
self):
""""""
*The setupModule method*
**Return:**
- ``log`` -- a logger
- ``dbConn`` -- a database connection to a test database (details from yaml settings file)
- ``pathToInputDir`` -- path to modules own test input directory
- ``pathToOutputDir`` -- path to modules own test output directory
""""""
import pymysql as ms
## VARIABLES ##
logging.config.dictConfig(yaml.load(self.loggerConfig))
log = logging.getLogger(__name__)
connDict = yaml.load(self.dbConfig)
dbConn = ms.connect(
host=connDict['host'],
user=connDict['user'],
passwd=connDict['password'],
db=connDict['db'],
use_unicode=True,
charset='utf8',
local_infile=1,
client_flag=ms.constants.CLIENT.MULTI_STATEMENTS,
connect_timeout=3600
)
dbConn.autocommit(True)
return log, dbConn, self.pathToInputDir, self.pathToOutputDir"
4401,"def _handle_call(self, actual_call, stubbed_call):
""""""Extends Stub call handling behavior to be callable by default.""""""
self._actual_calls.append(actual_call)
use_call = stubbed_call or actual_call
return use_call.return_value"
4402,"def formatted_args(self):
""""""Format call arguments as a string.
This is used to make test failure messages more helpful by referring
to calls using a string that matches how they were, or should have been
called.
>>> call = Call('arg1', 'arg2', kwarg='kwarg')
>>> call.formatted_args
""('arg1', 'arg2', kwarg='kwarg')""
""""""
arg_reprs = list(map(repr, self.args))
kwarg_reprs = ['%s=%s' % (k, repr(v)) for k, v in self.kwargs.items()]
return '(%s)' % ', '.join(arg_reprs + kwarg_reprs)"
4403,"def passing(self, *args, **kwargs):
""""""Assign expected call args/kwargs to this call.
Returns `self` for the common case of chaining a call to `Call.returns`
>>> Call().passing('foo', bar='baz')
<Call args=('foo',) kwargs={'bar': 'baz'}>
""""""
self.args = args
self.kwargs = kwargs
return self"
4404,"def check(self):
"""""" Check if data and third party tools are available