diff --git a/test/test_build.py b/test/test_build.py index 8453a51..c699e0a 100644 --- a/test/test_build.py +++ b/test/test_build.py @@ -70,7 +70,8 @@ def test_build_attachment(self): response = build.uploadAttachment(fn, comment='A self referencing upload!') - self.assertEqual(response['build'], build.pk) + self.assertEqual(response['model_type'], 'build') + self.assertEqual(response['model_id'], build.pk) self.assertEqual(response['comment'], 'A self referencing upload!') self.assertEqual(len(build.getAttachments()), n + 1) diff --git a/test/test_order.py b/test/test_order.py index b6eef3e..da93df8 100644 --- a/test/test_order.py +++ b/test/test_order.py @@ -384,7 +384,7 @@ def test_po_attachment(self): po.uploadAttachment('not_found.txt') # Check that attachments uploaded OK - attachments = po.getAttachments(self.api) + attachments = po.getAttachments() self.assertEqual(len(attachments), 3) @@ -519,7 +519,8 @@ def test_so_attachment(self): attachment = Attachment(self.api, pk=pk) - self.assertEqual(attachment.order, so.pk) + self.assertEqual(attachment.modeL_type, 'salesorder') + self.assertEqual(attachment.model_id, so.pk) self.assertEqual(attachment.comment, 'Sales order attachment') attachments = so.getAttachments()