~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/test_baz_import.py

  • Committer: Robert Collins
  • Date: 2005-10-19 05:30:26 UTC
  • mto: (147.4.12) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20051019053026-1065551f14648c22
get all tests passing again, and disable importing the body of continuation log messages

Show diffs side-by-side

added added

removed removed

Lines of Context:
423
423
class TestNamespaceMapping(TestCase):
424
424
 
425
425
    def test_namespace_mapping_branch(self):
426
 
        from baz_import import map_namespace
 
426
        from bzrlib.plugins.bzrtools.baz_import import map_namespace
427
427
        branch = pybaz.Branch('foo@example.com/c--b')
428
428
        self.assertRaises(pybaz.errors.NamespaceError, map_namespace, branch)
429
429
        self.assertEqual('c/b', map_namespace(branch['0']))
430
430
        self.assertEqual('c/0.1/b', map_namespace(branch['0.1']))
431
431
 
432
432
    def test_namespace_mapping_no_branch(self):
433
 
        from baz_import import map_namespace
 
433
        from bzrlib.plugins.bzrtools.baz_import import map_namespace
434
434
        category = pybaz.Category('foo@example.com/c')
435
435
        self.assertRaises(pybaz.errors.NamespaceError, map_namespace, category)
436
436
        self.assertEqual('c/+trunk', 
467
467
        shutil.rmtree(os.path.join(self._tmpdir, 'tree'))
468
468
 
469
469
    def test_cmd_exists(self):
470
 
        from bzrlib.plugins.baz_import.baz_import import cmd_baz_import
 
470
        from bzrlib.plugins.bzrtools.baz_import import cmd_baz_import
471
471
 
472
472
    def test_empty_archive(self):
473
473
        command = cmd_baz_import()
484
484
        self.failUnless(os.path.exists(os.path.join(self._tmpdir,'output')))
485
485
        self.failUnless(os.path.exists(os.path.join(self._tmpdir,'output', 'c','+trunk')))
486
486
        self.failUnless(os.path.exists(os.path.join(self._tmpdir,'output', 'c1', '0.2','branch')))
487
 
        self.assertEqual(12,
 
487
        self.assertEqual(14,
488
488
                        len(list(os.walk(os.path.join(self._tmpdir,'output')))))
489
489
 
490
490
    def test_run_twice(self):