Skip to content

Commit

Permalink
fix tests for 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmaslanka committed May 6, 2020
1 parent b824d22 commit e1e0eb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_clustering/test_things.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@

class TestConnecting(unittest.TestCase):
def test_on_fail(self):
"""Assert that on_fail doesn't fire if the cluster fails to connect"""
q = {'failed': False}
c = Cluster(
NodeDefinition(os.environ.get('AMQP_HOST', '127.0.0.1'), 'xguest', 'xguest', heartbeat=20),
on_fail=lambda: q.update(failed=True))
self.assertRaises(ConnectionDead, c.start)
c.shutdown()
self.assertTrue(q['failed'])
self.assertFalse(q['failed'])

def test_on_clean(self):
q = {'failed': False}
Expand Down

0 comments on commit e1e0eb3

Please sign in to comment.