Skip to content

Commit

Permalink
Merge pull request #4416 from GeotrekCE/fix_some_flaky_tests
Browse files Browse the repository at this point in the history
fix some flaky tests
  • Loading branch information
submarcos authored Dec 16, 2024
2 parents 3dea866 + 45d9f15 commit db4d50d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
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

0 comments on commit db4d50d

Please sign in to comment.