cfme.utils.smtp_collector_client module

class cfme.utils.smtp_collector_client.SMTPCollectorClient(host='localhost', port=1026)[source]

Bases: object

Client for smtp_collector.py script

Parameters:
  • host – Host where collector runs (Default: localhost)
  • port – Port where the collector query interface listens (Default: 1026)
clear_database()[source]

Clear the database in collector

Returns: bool

get_emails(**filter)[source]

Get emails. Eventually apply filtering on SQLite level

Time variables can be passed as instances of utils.timeutil.parsetime. That carries out the necessary conversion automatically.

_like args - see SQLite’s LIKE operator syntax

Keywords:
from_address: E-mail matches. to_address: E-mail matches. subject: Subject matches exactly. subject_like: Subject is LIKE. time_from: E-mails arrived since this time. time_to: E-mail arrived before this time. text: Text matches exactly. text_like: Text is LIKE.

Returns: List of dicts with e-mails matching the criteria.

get_html_report()[source]
set_test_name(test_name)[source]

Set the test name for folder name in the collector.

Parameters:test_name – Name to set

Returns: bool with result.