Beispiel #1
0
 def test_unpack_with_no_matches(self):
     cmd_kwargs = ["egg", 'sausage']
     expected = ''
     with mock.patch.object(Singularity, 'CMD_KWARGS', cmd_kwargs):
         s = Singularity(None, None)
         result = s.unpack_cmd_kwargs()
     self.assertEqual(result, expected)
Beispiel #2
0
 def test_unpack_with_no_kwargs(self):
     cmd_kwargs = []
     self.params['egg'] = 'scrambled'
     expected = ''
     with mock.patch.object(Singularity, 'CMD_KWARGS', cmd_kwargs):
         s = Singularity(None, None)
         result = s.unpack_cmd_kwargs()
     self.assertEqual(result, expected)
Beispiel #3
0
 def test_cmd_with_multiple_fulfilled_args_option(self):
     cmd_kwargs = ["egg", 'sausage']
     self.params['egg'] = 'poached'
     self.params['sausage'] = 'fried'
     expected = '--egg poached --sausage fried'
     with mock.patch.object(Singularity, 'CMD_KWARGS', cmd_kwargs):
         s = Singularity(None, None)
         result = s.unpack_cmd_kwargs()
     self.assertEqual(result, expected)