diff options
author | liyin <liyin11@huawei.com> | 2017-05-08 09:04:32 +0000 |
---|---|---|
committer | Yu Yang (Gabriel) <Gabriel.yuyang@huawei.com> | 2017-05-19 07:58:49 +0000 |
commit | fb9e1a726d3a598494fd38330848ef676219a47a (patch) | |
tree | bfb2d60c1ce3f6688b92e5787818f222d620f52e /testsuites/vstf/vstf_scripts/vstf/controller/reporters/mail/sendmail.py | |
parent | 6dff90faee27dc5569255f5cb6ba72ae5e22b924 (diff) |
Delete testcase of rubbos and vstf.
JIRA:BOTTLENECK-167
This patch will delete vstf and rubbos testcase code.
Include some testcase config file,
if there will be someone who want to use this testcase
maybe B or C version code will contain those testcase.
if you use the D version code to run this two testcase
we will info you that:
Rubbos testsuite is not updating anymore.
This entrance for running Rubbos within Bottlenecks is no longer supported.
Change-Id: I04e4042ff3998b3696df2ed47a9ffab6f1620ec3
Signed-off-by: liyin <liyin11@huawei.com>
(cherry picked from commit 6a8257127b3dce1f18a650afe6921a34b6c6f5b8)
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/controller/reporters/mail/sendmail.py')
-rw-r--r-- | testsuites/vstf/vstf_scripts/vstf/controller/reporters/mail/sendmail.py | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/controller/reporters/mail/sendmail.py b/testsuites/vstf/vstf_scripts/vstf/controller/reporters/mail/sendmail.py deleted file mode 100644 index 42f991a8..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/controller/reporters/mail/sendmail.py +++ /dev/null @@ -1,70 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -import logging -from vstf.controller.reporters.mail.mail import Mail -from vstf.controller.settings.mail_settings import MailSettings -LOG = logging.getLogger(__name__) - - -class SendMail(object): - - def __init__(self, mail_info): - self._mail_info = mail_info - - def send(self): - send = Mail(self._mail_info['server']['host'], - self._mail_info['server']['username'], - self._mail_info['server']['password'] - ) - send.attach_addr(self._mail_info['body']['from'], send.FROM) - send.attach_addr(self._mail_info['body']['to'], send.TO) - send.attach_addr(self._mail_info['body']['cc'], send.CC) - send.attach_addr(self._mail_info['body']['bcc'], send.CC) - - LOG.info(self._mail_info['body']) - - if 'attach' in self._mail_info['body']: - send.attach_files(self._mail_info['body']['attach']) - send.attach_text( - self._mail_info['body']['content'], - self._mail_info['body']['subtype']) - send.attach_title(self._mail_info['body']['subject']) - send.send() - - -def unit_test(): - mail_settings = MailSettings() - mail = SendMail(mail_settings.settings) - - attach_list = ['1', '2'] - mail_settings.set_attach(attach_list) - - context = """ - <!DOCTYPE html> - <html> - <head> - <title>vstf</title> - </head> - - <body> - hello vstf - </body> - - </html> - """ - mail_settings.set_subtype('html') - mail_settings.set_content(context) - - mail.send() - - -if __name__ == '__main__': - unit_test() |