diff --git a/backend/globaleaks/tests/handlers/recipient/test_rtip.py b/backend/globaleaks/tests/handlers/recipient/test_rtip.py index 3f96acb2c8..592ec69ced 100644 --- a/backend/globaleaks/tests/handlers/recipient/test_rtip.py +++ b/backend/globaleaks/tests/handlers/recipient/test_rtip.py @@ -283,9 +283,10 @@ def test_silence_notify(self): def test_delete(self): rtip_descs = yield self.get_rtips() self.assertEqual(len(rtip_descs), self.population_of_submissions * self.population_of_recipients) - + receiver_name = 'receiver1@receiver1.xxx' + receiver = next((r for r in rtip_descs[0]['receivers'] if r['name'] == receiver_name), None) # we delete the first and then we verify that the second does not exist anymore - handler = self.request(role='receiver', user_id=rtip_descs[0]['receiver_id']) + handler = self.request(role='receiver', user_id=receiver['id']) yield handler.delete(rtip_descs[0]['id']) rtip_descs = yield self.get_rtips()