aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/decorators.py
AgeCommit message (Collapse)AuthorFilesLines
2017-06-05Add the copyright header to decorators.pyCédric Ollivier1-0/+7
Change-Id: Ie7c60b8ca174c9c95920d0b7ef73b8eff60ae7e1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-17Add Python3 support to the ODL testcaseCédric Ollivier1-3/+3
It also adds this support to its dependencies. Change-Id: I0534f0c7b0e15a9ee89f522f314cf5200874454c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-14Assign the wrapped function’s attributesCédric Ollivier1-0/+2
It mainly assigns to the wrapper push_results_to_db's __name__, __module__ and __doc__ and the documentation string. Change-Id: Idc882ac4e743699a4887e46c5066e0983c90afd9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-04-20Fix pylint warnings in decorators.pyCédric Ollivier1-8/+12
Change-Id: Ie6c53feb97053248c909d641753b44b5f51c8719 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-04-19Stop hardcoding results suffix in push_to_dbMatthewLi1-2/+3
Adding results in url is useless as it is defined in results section in config_functest.yaml. It allows defining the full name in case of dumping to file (see decorator.py). The commented local file is the value required by dovetail. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I35ba9b34d99e138292f099934e28585ee8b85604 Signed-off-by: MatthewLi <matthew.lijun@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-22Switch test_db_url to a directoryxudan1-1/+8
We must now set a dir (e.g. /home/opnfv/db) to dump results. It avoids replacing "results" and prevent from limiting the use of this decorator. All data will be dumped into url/dump.txt As also proposed in FUNCTEST-729, missing directories are created too. The decorator will raise exceptions if dir exists or if target is not a directory. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> JIRA: FUNCTEST-729 Change-Id: I9650c72493043539f17725f5c328c12639ecc059 Signed-off-by: xudan <xudan16@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-13Add can_dump_request_to_file decoratorCédric Ollivier1-0/+36
can_dump_request_to_file can be called to dump any request data to a local file as defined by test_db_url. If its scheme is file, Session.send() is patched. Else the behavior is kept unchanged. Change-Id: Id219dad274b5f02a05259a2ed13e882c04eea7b4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>