'Test the retire_order command'

def test_retire_order(self):

    nonexistent_id = (max((order.id for order in Order.objects.all())) + 1)
    order_ids = [self.cart.id, self.paying.id, self.already_defunct_cart.id, self.purchased.id, nonexistent_id]
    self._create_tempfile_and_call_command(order_ids)
    self.assertEqual(Order.objects.get(id=self.cart.id).status, 'defunct-cart')
    self.assertEqual(Order.objects.get(id=self.paying.id).status, 'defunct-paying')
    self.assertEqual(Order.objects.get(id=self.already_defunct_cart.id).status, 'defunct-cart')
    self.assertEqual(Order.objects.get(id=self.purchased.id).status, 'purchased')
