Exemplo n.º 1
0
 def test_unit__stop__ok__nominal_test(self):
     mf = MailFetcher(
         host="host_imap",
         port="993",
         use_ssl=True,
         password="******",
         folder="INBOX",
         use_idle=True,
         use_html_parsing=True,
         use_txt_parsing=True,
         lockfile_path="email_fetcher.lock",
         api_base_url="http://127.0.0.1:6543/api",
         burst=True,
         api_key="apikey",
         connection_max_lifetime=60,
         heartbeat=60,
         reply_to_pattern="",
         references_pattern="",
         user="******",
     )
     assert mf._is_active
     mf.stop()
     assert not mf._is_active
Exemplo n.º 2
0
 def test_unit__stop__ok__nominal_test(self):
     mf = MailFetcher(
         host='host_imap',
         port='993',
         use_ssl=True,
         password='******',
         folder='INBOX',
         use_idle=True,
         use_html_parsing=True,
         use_txt_parsing=True,
         lockfile_path='email_fetcher.lock',
         api_base_url='http://127.0.0.1:6543/api',
         burst=True,
         api_key='apikey',
         connection_max_lifetime=60,
         heartbeat=60,
         reply_to_pattern='',
         references_pattern='',
         user='******',
     )
     assert mf._is_active
     mf.stop()
     assert not mf._is_active