~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Martin Pool
  • Date: 2005-10-06 04:09:55 UTC
  • mfrom: (1413)
  • mto: (1185.13.3)
  • mto: This revision was merged to the branch mainline in revision 1417.
  • Revision ID: mbp@sourcefrog.net-20051006040955-36f27e5a8d5c977b
[merge] from robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
"""Black-box tests for bzr.
20
20
 
21
21
These check that it behaves properly when it's invoked through the regular
22
 
command-line interface.  This doesn't actually run a new interpreter but 
 
22
command-line interface. This doesn't actually run a new interpreter but 
23
23
rather starts again from the run_bzr function.
24
24
"""
25
25
 
33
33
from bzrlib.selftest import TestCaseInTempDir, BzrTestBase
34
34
from bzrlib.branch import Branch
35
35
from bzrlib.osutils import has_symlinks
 
36
from bzrlib.selftest.HTTPTestUtil import TestCaseWithWebserver
36
37
 
37
38
 
38
39
class ExternalBase(TestCaseInTempDir):
676
677
            chdir("..")
677
678
        else:
678
679
            progress("skipping symlink tests")
679
 
            
 
680
 
 
681
 
 
682
class HttpTests(TestCaseWithWebserver):
 
683
    """Test bzr ui commands against remote branches."""
 
684
 
 
685
    def test_branch(self):
 
686
        os.mkdir('from')
 
687
        branch = Branch.initialize('from')
 
688
        branch.commit('empty commit for nonsense', allow_pointless=True)
 
689
        url = self.get_remote_url('from')
 
690
        self.run_bzr('branch', url, 'to')
 
691
        branch = Branch.open('to')
 
692
        self.assertEqual(1, len(branch.revision_history()))