Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some flaky tests #4416

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion geotrek/maintenance/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def target_csv_display(self):
return _('Deleted') + title
if model._meta.model_name == "topology":
title = _('Path')
return ", ".join(["%s: %s (%s)" % (title, path, path.pk) for path in self.target.paths.all()])
return ", ".join(["%s: %s (%s)" % (title, path, path.pk) for path in self.target.paths.all().order_by('id')])
return "%s: %s (%s)" % (
_(self.target._meta.verbose_name),
self.target,
Expand Down
1 change: 0 additions & 1 deletion geotrek/trekking/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ def test_pictures_print_thumbnail_correct_picture(self):
trek = TrekFactory()
AttachmentImageFactory.create_batch(5, content_object=trek)
self.assertEqual(trek.pictures.count(), 5)
self.assertEqual(len(os.listdir(os.path.dirname(trek.attachments.first().attachment_file.path))), 5, os.listdir(os.path.dirname(trek.attachments.first().attachment_file.path)))
self.assertTrue(isinstance(trek.picture_print, ThumbnailFile))

def test_pictures_print_thumbnail_wrong_picture(self):
Expand Down
Loading