Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
fix tests and code to work with current core
Browse files Browse the repository at this point in the history
  • Loading branch information
hpk42 committed Feb 12, 2021
1 parent a023772 commit ae298b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Changelog
=========

xxx
-------------
0.8.0 (unreleased)
------------------

- major rewrite of deltabot to use new deltachat core python bindings
which are pluginized themselves.
Expand Down
4 changes: 1 addition & 3 deletions src/deltabot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def perform_configure_address(self, email, password):
""" perform initial email/password bot account configuration. """
# XXX support reconfiguration (changed password at least)
assert not self.is_configured()
assert not self.account.is_started()
tracker = ConfigureTracker(self.account)
with self.account.temp_plugin(tracker) as configtracker:
self.account.update_config(dict(addr=email, mail_pw=password))
Expand All @@ -173,8 +172,7 @@ def start(self):
addr = self.account.get_config("addr")
self.logger.info("bot listening at: {}".format(addr))
self._eventhandler.start()
if not self.account.is_started():
self.account.start_io()
self.account.start_io()

def wait_shutdown(self):
""" Wait and block until bot account is shutdown. """
Expand Down
2 changes: 1 addition & 1 deletion tests/test_deltabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_get_chat(self, mock_bot):

def test_create_group(self, mock_bot):
members = set(["x{}@example.org".format(i) for i in range(3)])
chat = mock_bot.create_group("test", members=members)
chat = mock_bot.create_group("test", contacts=members)
assert chat.get_name() == "test"
assert chat.is_group()
for contact in chat.get_contacts():
Expand Down

0 comments on commit ae298b4

Please sign in to comment.