Changeset 9cc65af in OpenWorkouts-current


Ignore:
Timestamp:
Oct 13, 2019, 8:13:04 PM (3 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current
Children:
b9a2c00
Parents:
8340661
Message:

Make root.emails return emails sorted alphabetically
(makes our life easier in some randomly failing tests)

Location:
ow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ow/models/root.py

    r8340661 r9cc65af  
    121121    def emails(self):
    122122        """
    123         Return all emails currently in use by users
     123        Return all emails currently in use by users, sorted alphabetically
    124124        """
    125         return [user.email for user in self.users]
     125        return sorted([user.email for user in self.users])
    126126
    127127    @property
  • ow/tests/models/test_root.py

    r8340661 r9cc65af  
    156156                    email='Jack.Dumb@example.net')
    157157        root.add_user(user)
    158         assert root.lowercase_emails == ['john.doe@example.net',
    159                                          'jack.dumb@example.net']
     158        assert root.lowercase_emails == ['jack.dumb@example.net',
     159                                         'john.doe@example.net']
    160160
    161161    def test_sports(self, root, john):
Note: See TracChangeset for help on using the changeset viewer.