tools/bdconfig/lib/google_hadoop/bdconfig_lib/config_commands_test.py
def testHdfsSpecificValidators(self):
    """If default_fs is hdfs, then we add extra validators."""
    self._SetDefaultValidFlags()
    self._flag_values_copy.dry_run = False

    # Using hdfs will invoke new validators.
    self._flag_values_copy.default_fs = 'hdfs'

    # namenode_uri fails to be set using hdfs-site.xml
    self.assertRaises(KeyError, self._test_cmd.Run, None)
    self.assertRaises(
        flags.IllegalFlagValue, self._flag_values_copy.__setattr__,
        'namenode_uri', 'badscheme://localhost:8020/')
    # Missing trailing slash.
    self.assertRaises(
        flags.IllegalFlagValue, self._flag_values_copy.__setattr__,
        'namenode_uri', 'hdfs://localhost:8020')
If default_fs is hdfs, then we add extra validators.
If default_fs is hdfs, then we add extra validators.
If default_fs is hdfs then we add extra validators .
def testHdfsSpecificValidators(self):
    self._SetDefaultValidFlags()
    self._flag_values_copy.dry_run = False
    self._flag_values_copy.default_fs = 'hdfs'
    self.assertRaises(KeyError, self._test_cmd.Run, None)
    self.assertRaises(
        flags.IllegalFlagValue, self._flag_values_copy.__setattr__,
        'namenode_uri', 'badscheme://localhost:8020/')
    self.assertRaises(
        flags.IllegalFlagValue, self._flag_values_copy.__setattr__,
        'namenode_uri', 'hdfs://localhost:8020')
def testHdfsSpecificValidators ( self ) : self . _SetDefaultValidFlags ( ) self . _flag_values_copy . dry_run = False self . _flag_values_copy . default_fs = 'hdfs' self . assertRaises ( KeyError , self . _test_cmd . Run , None ) self . assertRaises ( flags . IllegalFlagValue , self . _flag_values_copy . __setattr__ , 'namenode_uri' , 'badscheme://localhost:8020/' ) self . assertRaises ( flags . IllegalFlagValue , self . _flag_values_copy . __setattr__ , 'namenode_uri' , 'hdfs://localhost:8020' )
If default_fs is hdfs, then we add extra validators.
If default_fs is hdfs then we add extra validators .
"""If default_fs is hdfs, then we add extra validators.""" # Using hdfs will invoke new validators. # namenode_uri fails to be set using hdfs-site.xml # Missing trailing slash.
self