/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

  • Committer: Robert Collins
  • Date: 2009-03-03 03:27:51 UTC
  • mto: (4070.2.5 integration)
  • mto: This revision was merged to the branch mainline in revision 4075.
  • Revision ID: robertc@robertcollins.net-20090303032751-ubyfhezgjul6y5ic
Get BzrDir.cloning_metadir working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1169
1169
        # All control formats must have a network name.
1170
1170
        dir = self.make_bzrdir('.')
1171
1171
        format = dir._format
1172
 
        network_name = format.network_name()
1173
 
        self.assertIsInstance(network_name, str)
1174
1172
        # We want to test that the network_name matches the actual format on
1175
1173
        # disk. For local control dirsthat means that using network_name as a
1176
1174
        # key in the registry gives back the same format. For remote obects
1179
1177
        if isinstance(format, bzrdir.RemoteBzrDirFormat):
1180
1178
            dir._ensure_real()
1181
1179
            real_dir = dir._real_bzrdir
 
1180
            network_name = format.network_name()
1182
1181
            self.assertEqual(real_dir._format.network_name(), network_name)
1183
1182
        else:
1184
1183
            registry = bzrdir.network_format_registry
 
1184
            network_name = format.network_name()
1185
1185
            looked_up_format = registry.get(network_name)
1186
1186
            self.assertEqual(format.__class__, looked_up_format.__class__)
 
1187
        # The network name must be a byte string.
 
1188
        self.assertIsInstance(network_name, str)
1187
1189
 
1188
1190
    def test_open_not_bzrdir(self):
1189
1191
        # test the formats specific behaviour for no-content or similar dirs.