~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/blueprints/model/tests/test_sprint.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-28 02:33:34 UTC
  • mfrom: (13126.1.1 789222-sort-fix)
  • Revision ID: launchpad@pqm.canonical.com-20110528023334-kl2117l18xcglmfn
[r=lifeless,
        mbp][bug=789222] Sort sprint attendees by lowercase displayname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        #Test the sorting of attendances to be by displayname rather than name
18
18
        sprint = self.factory.makeSprint()
19
19
        bob = self.factory.makePerson(name='zbob', displayname='Bob')
 
20
        ced = self.factory.makePerson(name='xed', displayname='ced')
20
21
        dave = self.factory.makePerson(name='wdave', displayname='Dave')
21
22
        sprint.attend(
22
23
            bob, sprint.time_starts, sprint.time_ends, True)
23
24
        sprint.attend(
 
25
            ced, sprint.time_starts, sprint.time_ends, True)
 
26
        sprint.attend(
24
27
            dave, sprint.time_starts, sprint.time_ends, True)
25
 
        attendances = [bob.displayname, dave.displayname]
 
28
        attendances = [bob.displayname, ced.displayname, dave.displayname]
26
29
        people = [attendee.attendee.displayname for attendee in sprint.attendances]
27
30
        self.assertEqual(attendances, people)