Exemplo n.º 1
0
 def clone_online_account(self, account):
     self.live_count += 1
     tmpdb = tmpdir.join("livedb%d" % self.live_count)
     ac = Account(tmpdb.strpath, logid="ac{}".format(self.live_count))
     ac._evlogger.init_time = self.init_time
     ac._evlogger.set_timeout(30)
     ac.configure(addr=account.get_config("addr"), mail_pw=account.get_config("mail_pw"))
     ac.start_threads()
     self._finalizers.append(lambda: ac.stop_threads(wait=False))
     return ac
Exemplo n.º 2
0
 def get_online_configuring_account(self):
     if not fn:
         pytest.skip("specify a --liveconfig file to run tests with real accounts")
     self.live_count += 1
     configdict = self.configlist.pop(0)
     tmpdb = tmpdir.join("livedb%d" % self.live_count)
     ac = Account(tmpdb.strpath, logid="ac{}".format(self.live_count))
     ac._evlogger.init_time = self.init_time
     ac._evlogger.set_timeout(30)
     ac.configure(**configdict)
     ac.start_threads()
     self._finalizers.append(ac.stop_threads)
     return ac
Exemplo n.º 3
0
 def get_online_configuring_account(self):
     if not fn:
         pytest.skip("specify a --liveconfig file to run tests with real accounts")
     self.live_count += 1
     configdict = self.configlist.pop(0)
     tmpdb = tmpdir.join("livedb%d" % self.live_count)
     ac = Account(tmpdb.strpath, logid="ac{}".format(self.live_count))
     ac._evlogger.init_time = self.init_time
     ac._evlogger.set_timeout(30)
     ac.configure(**configdict)
     ac.start_threads()
     self._finalizers.append(ac.stop_threads)
     return ac
Exemplo n.º 4
0
 def get_online_configuring_account(self):
     if not session_liveconfig:
         pytest.skip("specify DCC_PY_LIVECONFIG or --liveconfig")
     configdict = session_liveconfig.get(self.live_count)
     self.live_count += 1
     if "e2ee_enabled" not in configdict:
         configdict["e2ee_enabled"] = "1"
     tmpdb = tmpdir.join("livedb%d" % self.live_count)
     ac = Account(tmpdb.strpath, logid="ac{}".format(self.live_count))
     ac._evlogger.init_time = self.init_time
     ac._evlogger.set_timeout(30)
     ac.configure(**configdict)
     ac.start_threads()
     self._finalizers.append(ac.shutdown)
     return ac