tools/bdconfig/lib/google_hadoop/bdconfig_lib/config_commands_test.py
def testNormalOperationWithDefaultBucket(self):
    """With default_bucket provided, no fallback, check normal wiring."""
    self._SetDefaultValidFlags()
    self._flag_values_copy.dry_run = False

    self._flag_values_copy.default_bucket = 'some-other-bucket'
    system_bucket = 'system-bucket'
    conf = xml_configuration.Configuration.FromFile(self._core_site_filename)
    conf.Update({'fs.gs.system.bucket': system_bucket}, {})
    conf.WriteToFile(self._core_site_filename)

    self._test_cmd.Run(None)

    conf = xml_configuration.Configuration.FromFile(self._core_site_filename)
    self.assertEqual(2, conf.GetNumProperties())
    self.assertEqual(
        'gs://' + self._flag_values_copy.default_bucket + '/',
        conf.GetPropertyValue('fs.default.name'))
With default_bucket provided, no fallback, check normal wiring.
With default_bucket provided, no fallback, check normal wiring.
With default_bucket provided no fallback check normal wiring .
def testNormalOperationWithDefaultBucket(self):
    self._SetDefaultValidFlags()
    self._flag_values_copy.dry_run = False
    self._flag_values_copy.default_bucket = 'some-other-bucket'
    system_bucket = 'system-bucket'
    conf = xml_configuration.Configuration.FromFile(self._core_site_filename)
    conf.Update({'fs.gs.system.bucket': system_bucket}, {})
    conf.WriteToFile(self._core_site_filename)
    self._test_cmd.Run(None)
    conf = xml_configuration.Configuration.FromFile(self._core_site_filename)
    self.assertEqual(2, conf.GetNumProperties())
    self.assertEqual(
        'gs://' + self._flag_values_copy.default_bucket + '/',
        conf.GetPropertyValue('fs.default.name'))
def testNormalOperationWithDefaultBucket ( self ) : self . _SetDefaultValidFlags ( ) self . _flag_values_copy . dry_run = False self . _flag_values_copy . default_bucket = 'some-other-bucket' system_bucket = 'system-bucket' conf = xml_configuration . Configuration . FromFile ( self . _core_site_filename ) conf . Update ( { 'fs.gs.system.bucket' : system_bucket } , { } ) conf . WriteToFile ( self . _core_site_filename ) self . _test_cmd . Run ( None ) conf = xml_configuration . Configuration . FromFile ( self . _core_site_filename ) self . assertEqual ( 2 , conf . GetNumProperties ( ) ) self . assertEqual ( 'gs://' + self . _flag_values_copy . default_bucket + '/' , conf . GetPropertyValue ( 'fs.default.name' ) )
With default_bucket provided, no fallback, check normal wiring.
With default_bucket provided no fallback check normal wiring .
"""With default_bucket provided, no fallback, check normal wiring."""
self