Example #1
0
 def test_empty(self):
     commands = process_arguments()
     self.assertEquals(commands, [])
Example #2
0
 def test_missing_option(self):
     with self.assertRaises(IndexError):
         process_arguments('--munin')
Example #3
0
 def test_two_command_plus_one_configuration(self):
     commands = process_arguments('postgres', 'munin', '--munin', 'localhost')
     self.assertEquals(commands, [('postgres', None), ('munin', None), ('munin', 'localhost')])
Example #4
0
 def test_two_command(self):
     commands = process_arguments('postgres', 'munin')
     self.assertEquals(commands, [('postgres', None), ('munin', None)])
Example #5
0
 def test_one_configuration(self):
     commands = process_arguments('--munin', 'localhost')
     self.assertEquals(commands, [('munin', 'localhost')])
Example #6
0
 def test_one_command(self):
     commands = process_arguments('postgres')
     self.assertEquals(commands, [('postgres', None)])