Don't eat federation transmit errors during unit tests; fix remote presence EDU-sending test because of this

This commit is contained in:
Paul "LeoNerd" Evans 2014-09-02 15:38:48 +01:00
parent 061e814195
commit 86d6232236
2 changed files with 16 additions and 1 deletions

View File

@ -628,7 +628,6 @@ class _TransactionQueue(object):
for deferred in deferreds:
deferred.errback(e)
yield deferred
finally:
# We want to be *very* sure we delete this after we stop processing

View File

@ -719,6 +719,22 @@ class PresencePushTestCase(unittest.TestCase):
),
defer.succeed((200, "OK"))
)
put_json.expect_call_and_return(
call("remote",
path=ANY, # Can't guarantee which txn ID will be which
data=_expect_edu("remote", "m.presence",
content={
"push": [
{"user_id": "@apple:test",
"presence": u"online",
"state": u"online",
"last_active_ago": 0},
],
}
)
),
defer.succeed((200, "OK"))
)
self.room_members = [self.u_apple, self.u_onion]