def test__run(self): self.runner.pid_file = "/tmp/jmc.pid" self.runner.db_url = self.db_url def do_nothing(): return (False, 0) self.runner._run(do_nothing) model.db_connection_str = self.runner.db_url model.db_connect() # dropTable should succeed because tables should exist Account.dropTable() PresenceAccount.dropTable() User.dropTable() LegacyJID.dropTable() MailAccount.dropTable() IMAPAccount.dropTable() POP3Account.dropTable() SMTPAccount.dropTable() model.db_disconnect() self.assertFalse(os.access("/tmp/jmc.pid", os.F_OK))