MCPcopy Create free account
hub / github.com/chatmail/core / test_basic_states

Method test_basic_states

python/tests/test_4_lowlevel.py:34–46  ·  view source on GitHub ↗
(self, acfactory, monkeypatch, testprocess)

Source from the content-addressed store, hash-verified

32 assert newbase.joinpath("dir1", "file1").exists()
33
34 def test_basic_states(self, acfactory, monkeypatch, testprocess):
35 pc = ACSetup(init_time=0.0, testprocess=testprocess)
36 acc = acfactory.get_unconfigured_account()
37 monkeypatch.setattr(acc, "configure", lambda **kwargs: None)
38 pc.start_configure(acc)
39 assert pc._account2state[acc] == pc.CONFIGURING
40 pc._configured_events.put((acc, True, None))
41 monkeypatch.setattr(pc, "init_imap", lambda *args, **kwargs: None)
42 pc.wait_one_configured(acc)
43 assert pc._account2state[acc] == pc.CONFIGURED
44 monkeypatch.setattr(pc, "_onconfigure_start_io", lambda *args, **kwargs: None)
45 pc.bring_online()
46 assert pc._account2state[acc] == pc.IDLEREADY
47
48 def test_two_accounts_one_waited_all_started(self, monkeypatch, acfactory, testprocess):
49 pc = ACSetup(init_time=0.0, testprocess=testprocess)

Callers

nothing calls this directly

Calls 6

start_configureMethod · 0.95
wait_one_configuredMethod · 0.95
bring_onlineMethod · 0.95
ACSetupClass · 0.90
putMethod · 0.80

Tested by

no test coverage detected