~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/__init__.py

[r=allenap][no-qa] Add
 PlainPackageCopyJob.getIncompleteJobsForArchive() method which will return
 all the WAITING, RUNNING or FAILED copy jobs for the passed archive.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
import testtools
99
99
from testtools.content import Content
100
100
from testtools.content_type import UTF8_TEXT
101
 
from testtools.matchers import MatchesRegex
 
101
from testtools.matchers import (
 
102
    Equals,
 
103
    MatchesRegex,
 
104
    MatchesSetwise,
 
105
    )
102
106
from testtools.testcase import ExpectedException as TTExpectedException
103
107
import transaction
104
108
from zope.component import (
519
523
 
520
524
    def assertContentEqual(self, iter1, iter2):
521
525
        """Assert that 'iter1' has the same content as 'iter2'."""
522
 
        list1 = sorted(iter1)
523
 
        list2 = sorted(iter2)
524
 
        self.assertEqual(
525
 
            list1, list2, '%s != %s' % (pformat(list1), pformat(list2)))
 
526
        self.assertThat(iter1, MatchesSetwise(*(map(Equals, iter2))))
526
527
 
527
528
    def assertRaisesWithContent(self, exception, exception_content,
528
529
                                func, *args):