~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/codehosting/tests/test_acceptance.py

  • Committer: Aaron Bentley
  • Date: 2008-01-21 05:44:15 UTC
  • mto: This revision was merged to the branch mainline in revision 5586.
  • Revision ID: aaron@canonical.com-20080121054415-zjklfqnpbqe25v81
Quicksave

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib.builtins import cmd_branch, cmd_push
18
18
from bzrlib.errors import (
19
19
    BzrCommandError, NotBranchError, TransportNotPossible)
 
20
from bzrlib.plugins.loom import branch as loom_branch
20
21
from bzrlib.repofmt.weaverepo import RepositoryFormat7
21
22
from bzrlib.repository import format_registry
22
23
 
508
509
            (BzrCommandError, TransportNotPossible),
509
510
            self.push, self.local_branch_path, remote_url)
510
511
 
 
512
    @deferToThread
 
513
    def test_can_push_loom_branch(self):
 
514
        # We can push and pull a loom branch.
 
515
        tree = self.make_branch_and_tree('loom')
 
516
        tree.lock_write()
 
517
        try:
 
518
            tree.branch.nick = 'bottom-thread'
 
519
            loom_branch.loomify(tree.branch)
 
520
        finally:
 
521
            tree.unlock()
 
522
        loomtree = tree.bzrdir.open_workingtree()
 
523
        loomtree.lock_write()
 
524
        loomtree.branch.new_thread('bottom-thread')
 
525
        loomtree.commit('this is a commit', rev_id='commit-1')
 
526
        loomtree.unlock()
 
527
        loomtree.branch.record_loom('sample loom')
 
528
        remote_url = self.getTransportURL('~testuser/+junk/loom')
 
529
        self.push('loom', remote_url)
 
530
        self.assertBranchesMatch('loom', remote_url)
 
531
 
511
532
 
512
533
class SmartserverTests(SSHTestCase):
513
534
    """Acceptance tests for the codehosting smartserver."""