Skip to content

Commit

Permalink
More unit test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Jun 11, 2024
1 parent b6f4f8a commit 4f210ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions test/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 4f210ad

Please sign in to comment.