def test_append_to_non_empty(self):
   arguments = ['--other']
   key = '--something='
   value = 'val'
   expected_result = ['--other', '--something=val']
   self.assertEquals(expected_result, shell_arguments.append_to_argument(
       arguments, key, value))
 def test_append_to_existing(self):
   arguments = ['--something=old_val']
   key = '--something='
   value = 'val'
   expected_result = ['--something=old_val,val']
   self.assertEquals(expected_result, shell_arguments.append_to_argument(
       arguments, key, value))
예제 #3
0
 def testAppendToEmpty(self):
   arguments = []
   key = '--something='
   value = 'val'
   expected_result = ['--something=val']
   self.assertEquals(expected_result, shell_arguments.append_to_argument(
       arguments, key, value))