Lesson.order from the book (seed sets it, also re-syncs unit/node order); matrix lesson rows as one multi-line step
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,7 @@ class StableOrderTests(TestCase):
|
||||
def test_content_querysets_have_explicit_order(self):
|
||||
for qs in (Lesson.objects.all(), Question.objects.all(), Choice.objects.all()):
|
||||
self.assertIn('ORDER BY', str(qs.query), qs.model.__name__)
|
||||
self.assertEqual(qs.query.order_by or qs.model._meta.ordering, ['id'])
|
||||
self.assertEqual(qs.model._meta.ordering[-1], 'id')
|
||||
|
||||
def test_lessons_come_back_in_creation_order_after_updates(self):
|
||||
grade = Grade.objects.create(title='پایه', number=99)
|
||||
|
||||
Reference in New Issue
Block a user