mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
fix test-state modification bug (online tests running after OnlineConfigureFails tests would break)
This commit is contained in:
@@ -161,7 +161,7 @@ def acfactory(pytestconfig, tmpdir, request, session_liveconfig):
|
|||||||
ac = self.make_account(tmpdb.strpath, logid="ac{}".format(self.live_count))
|
ac = self.make_account(tmpdb.strpath, logid="ac{}".format(self.live_count))
|
||||||
ac._evlogger.init_time = self.init_time
|
ac._evlogger.init_time = self.init_time
|
||||||
ac._evlogger.set_timeout(30)
|
ac._evlogger.set_timeout(30)
|
||||||
return ac, configdict
|
return ac, dict(configdict)
|
||||||
|
|
||||||
def get_online_configuring_account(self):
|
def get_online_configuring_account(self):
|
||||||
ac, configdict = self.get_online_config()
|
ac, configdict = self.get_online_config()
|
||||||
|
|||||||
@@ -621,9 +621,7 @@ class TestOnlineAccount:
|
|||||||
class TestOnlineConfigureFails:
|
class TestOnlineConfigureFails:
|
||||||
def test_invalid_password(self, acfactory):
|
def test_invalid_password(self, acfactory):
|
||||||
ac1, configdict = acfactory.get_online_config()
|
ac1, configdict = acfactory.get_online_config()
|
||||||
pw = configdict["mail_pw"]
|
ac1.configure(addr=configdict["addr"], mail_pw="123")
|
||||||
configdict["mail_pw"] = pw[:-1] # wrong password
|
|
||||||
ac1.configure(**configdict)
|
|
||||||
ac1.start_threads()
|
ac1.start_threads()
|
||||||
wait_configuration_progress(ac1, 500)
|
wait_configuration_progress(ac1, 500)
|
||||||
ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK")
|
ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK")
|
||||||
@@ -632,9 +630,7 @@ class TestOnlineConfigureFails:
|
|||||||
|
|
||||||
def test_invalid_user(self, acfactory):
|
def test_invalid_user(self, acfactory):
|
||||||
ac1, configdict = acfactory.get_online_config()
|
ac1, configdict = acfactory.get_online_config()
|
||||||
addr = configdict["addr"]
|
ac1.configure(addr="x" + configdict["addr"], mail_pw=configdict["mail_pw"])
|
||||||
configdict["addr"] = "x" + addr # wrong user
|
|
||||||
ac1.configure(**configdict)
|
|
||||||
ac1.start_threads()
|
ac1.start_threads()
|
||||||
wait_configuration_progress(ac1, 500)
|
wait_configuration_progress(ac1, 500)
|
||||||
ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK")
|
ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK")
|
||||||
@@ -643,9 +639,7 @@ class TestOnlineConfigureFails:
|
|||||||
|
|
||||||
def test_invalid_domain(self, acfactory):
|
def test_invalid_domain(self, acfactory):
|
||||||
ac1, configdict = acfactory.get_online_config()
|
ac1, configdict = acfactory.get_online_config()
|
||||||
addr = configdict["addr"]
|
ac1.configure(addr=configdict["addr"] + "x", mail_pw=configdict["mail_pw"])
|
||||||
configdict["addr"] = addr + "x"
|
|
||||||
ac1.configure(**configdict)
|
|
||||||
ac1.start_threads()
|
ac1.start_threads()
|
||||||
wait_configuration_progress(ac1, 500)
|
wait_configuration_progress(ac1, 500)
|
||||||
ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK")
|
ev1 = ac1._evlogger.get_matching("DC_EVENT_ERROR_NETWORK")
|
||||||
|
|||||||
Reference in New Issue
Block a user