tests: inbox_by_document changed its behaviour since inbox-message now use documents ids

This commit is contained in:
Benjamin Dauvergne 2013-11-26 11:09:14 +01:00
parent e786499a1e
commit 4704690c5a
1 changed files with 1 additions and 3 deletions

View File

@ -173,8 +173,6 @@ class DelegatesTestCase(BaseTestCase):
c.login(username='delegate', password='delegate')
response = c.get('/inbox_by_document/%s/' % self.documents[0].id)
self.assertEqual(response.status_code, 302)
from .models import Mailbox
# Mailbox default ordering is -date so the last recipient mailbox
# is the first mailbox to be returned
mbox = Mailbox.objects.get(owner=self.users[1], document=self.documents[0])
self.assertTrue(response['Location'].endswith('/inbox/%s/' % mbox.id))
self.assertTrue(response['Location'].endswith('/inbox/%s/' % self.documents[0].id), response['Location'])