Commit 53bb6c10 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

parsemail: Don't test implicit database sorting

Be more explicit about how we sort when resolving project and don't
discriminate different ways of sorting empty string vs blank chars.
Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent ade37eea
......@@ -112,7 +112,7 @@ def find_project(mail):
# order_by will put projects with a blank subject_prefix_tags
# first
projects = Project.objects.filter(listid=listid).\
order_by('subject_prefix_tags')
order_by('subject_prefix_tags', 'id')
if not projects:
break
......
......@@ -463,8 +463,6 @@ class MultipleProjectsPerMailingListTest(TestCase):
"""To test the order_by()"""
self.project1.subject_prefix_tags = 'i-g-t'
self.project1.save()
self.project2.subject_prefix_tags = ' '
self.project2.save()
email = create_email(defaults.patch, project=self.project1,
subject='[PATCH i-g-t] Subject')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment