Exemple #1
0
 def test_empty(self):
     commands = process_arguments()
     self.assertEquals(commands, [])
Exemple #2
0
 def test_missing_option(self):
     with self.assertRaises(IndexError):
         process_arguments('--munin')
Exemple #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')])
Exemple #4
0
 def test_two_command(self):
     commands = process_arguments('postgres', 'munin')
     self.assertEquals(commands, [('postgres', None), ('munin', None)])
Exemple #5
0
 def test_one_configuration(self):
     commands = process_arguments('--munin', 'localhost')
     self.assertEquals(commands, [('munin', 'localhost')])
Exemple #6
0
 def test_one_command(self):
     commands = process_arguments('postgres')
     self.assertEquals(commands, [('postgres', None)])