Fix order

This commit is contained in:
Iacopo Spalletti 2016-10-08 22:42:35 +02:00
commit 21f6083248
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6
2 changed files with 3 additions and 3 deletions

View file

@ -210,11 +210,11 @@ try:
post.liveblog, 'LiveblogPlugin', language='en', body='plugin 3', publish=True,
post_date=current_date - timedelta(seconds=10)
)
self.assertTrue(Liveblog.objects.all().order_by('position').values_list('pk', flat=True), [3, 2, 1])
self.assertEqual(list(Liveblog.objects.all().order_by('position').values_list('pk', flat=True)), [1, 2, 3])
plugin.post_date = current_date - timedelta(seconds=20)
plugin.save()
self.assertTrue(Liveblog.objects.all().order_by('position').values_list('pk', flat=True), [1, 3, 2])
self.assertEqual(list(Liveblog.objects.all().order_by('position').values_list('pk', flat=True)), [2, 3, 1])
except ImportError: # pragma: no cover
pass