(self, acfactory, monkeypatch, testprocess)
| 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) |
nothing calls this directly
no test coverage detected