~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_send.py

  • Committer: Martin Pool
  • Date: 2010-04-21 11:27:04 UTC
  • mto: This revision was merged to the branch mainline in revision 5189.
  • Revision ID: mbp@canonical.com-20100421112704-zijso22b6pdevrxy
Simplify various code to use user_url

Show diffs side-by-side

added added

removed removed

Lines of Context:
307
307
    _default_sent_revs = ['local']
308
308
    _default_errors = ['Working tree ".*/local/" has uncommitted '
309
309
                       'changes \(See bzr status\)\.',]
310
 
    _default_additional_error = 'Use --no-strict to force the send.\n'
311
 
    _default_additional_warning = 'Uncommitted changes will not be sent.'
312
310
 
313
311
    def set_config_send_strict(self, value):
314
312
        # set config var (any of bazaar.conf, locations.conf, branch.conf
317
315
        conf.set_user_option('send_strict', value)
318
316
 
319
317
    def assertSendFails(self, args):
320
 
        out, err = self.run_send(args, rc=3, err_re=self._default_errors)
321
 
        self.assertContainsRe(err, self._default_additional_error)
 
318
        self.run_send(args, rc=3, err_re=self._default_errors)
322
319
 
323
320
    def assertSendSucceeds(self, args, revs=None, with_warning=False):
324
321
        if with_warning:
330
327
        out, err = self.run_send(args, err_re=err_re)
331
328
        bundling_revs = 'Bundling %d revision(s).\n' % len(revs)
332
329
        if with_warning:
333
 
            self.assertContainsRe(err, self._default_additional_warning)
334
330
            self.assertEndsWith(err, bundling_revs)
335
331
        else:
336
332
            self.assertEquals(bundling_revs, err)