mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-18 08:31:33 +00:00
Add API Calendar for Return Orders (#4899)
* Add RO to calendar output * Update title and description to be more descriptive * Add documentation * Add simple test for RO calendar * Lint/syntax * Lint * Changes to title, description
This commit is contained in:
@@ -2200,3 +2200,15 @@ class ReturnOrderTests(InvenTreeAPITestCase):
|
||||
self.assertEqual(deltas['customer'], customer.pk)
|
||||
self.assertEqual(deltas['location'], 1)
|
||||
self.assertEqual(deltas['returnorder'], rma.pk)
|
||||
|
||||
def test_ro_calendar(self):
|
||||
"""Test the calendar export endpoint"""
|
||||
|
||||
# Full test is in test_po_calendar. Since these use the same backend, test only
|
||||
# that the endpoint is available
|
||||
url = reverse('api-po-so-calendar', kwargs={'ordertype': 'return-order'})
|
||||
|
||||
# Test without completed orders
|
||||
response = self.get(url, expected_code=200, format=None)
|
||||
calendar = Calendar.from_ical(response.content)
|
||||
self.assertIsInstance(calendar, Calendar)
|
||||
|
Reference in New Issue
Block a user