~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-08 10:14:23 UTC
  • mfrom: (5013.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100208101423-q81doa9rua7c3x6t
(vila) Fix a bunch of test imports

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    errors,
26
26
    info,
27
27
    osutils,
 
28
    tests,
28
29
    upgrade,
29
30
    urlutils,
30
31
    )
31
 
from bzrlib.osutils import format_date
32
 
from bzrlib.tests import TestSkipped, MemoryServer
33
 
from bzrlib.tests.blackbox import ExternalBase
34
 
 
35
 
 
36
 
class TestInfo(ExternalBase):
 
32
from bzrlib.transport import memory
 
33
 
 
34
class TestInfo(tests.TestCaseWithTransport):
37
35
 
38
36
    def setUp(self):
39
 
        ExternalBase.setUp(self)
 
37
        super(TestInfo, self).setUp()
40
38
        self._repo_strings = "2a"
41
39
 
42
40
    def test_info_non_existing(self):
43
 
        self.vfs_transport_factory = MemoryServer
 
41
        self.vfs_transport_factory = memory.MemoryServer
44
42
        location = self.get_url()
45
43
        out, err = self.run_bzr('info '+location, retcode=3)
46
44
        self.assertEqual(out, '')
127
125
        self.assertEqual('', err)
128
126
        tree1.commit('commit one')
129
127
        rev = branch1.repository.get_revision(branch1.revision_history()[0])
130
 
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
128
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
131
129
 
132
130
        # Branch standalone with push location
133
131
        branch2 = branch1.bzrdir.sprout('branch').open_branch()
315
313
        tree1.add('b')
316
314
        tree1.commit('commit two')
317
315
        rev = branch1.repository.get_revision(branch1.revision_history()[-1])
318
 
        datestring_last = format_date(rev.timestamp, rev.timezone)
 
316
        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
319
317
 
320
318
        # Out of date branched standalone branch will not be detected
321
319
        out, err = self.run_bzr('info -v branch')
569
567
        tree2.add('a')
570
568
        tree2.commit('commit one')
571
569
        rev = repo.get_revision(branch2.revision_history()[0])
572
 
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
570
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
573
571
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
574
572
        self.assertEqualDiff(
575
573
"""Lightweight checkout (format: %s)
688
686
 
689
687
        # Out of date lightweight checkout
690
688
        rev = repo.get_revision(branch1.revision_history()[-1])
691
 
        datestring_last = format_date(rev.timestamp, rev.timezone)
 
689
        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
692
690
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
693
691
        self.assertEqualDiff(
694
692
"""Lightweight checkout (format: %s)
844
842
        tree1.add('a')
845
843
        tree1.commit('commit one')
846
844
        rev = repo.get_revision(branch1.revision_history()[0])
847
 
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
845
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
848
846
        out, err = self.run_bzr('info -v repo/branch1')
849
847
        self.assertEqualDiff(
850
848
"""Repository tree (format: knit)