Code review comment for lp:~blake-rouse/maas/fix-1364062

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Tuesday 02 September 2014 14:46:11 you wrote:
> You can probably do the check in one go:
> self.assertEqual(
> (proxy_address, proxy_address),
> (capture.env['http_proxy'], capture.env['http_proxys']))

ARGH. Please stop doing this, it makes test errors almost unreadable.

Use self.expectThat, which delays errors until the test is finished.

In this instance you can also use MatchesAll as you have the same predicate:

self.assertThat(
    proxy_address, MatchesAll(
        Equals(capture.env['http_proxy']),
        Equals(capture.env['https_proxy'])
    ))

« Back to merge proposal