def test_empty(self): commands = process_arguments() self.assertEquals(commands, [])
def test_missing_option(self): with self.assertRaises(IndexError): process_arguments('--munin')
def test_two_command_plus_one_configuration(self): commands = process_arguments('postgres', 'munin', '--munin', 'localhost') self.assertEquals(commands, [('postgres', None), ('munin', None), ('munin', 'localhost')])
def test_two_command(self): commands = process_arguments('postgres', 'munin') self.assertEquals(commands, [('postgres', None), ('munin', None)])
def test_one_configuration(self): commands = process_arguments('--munin', 'localhost') self.assertEquals(commands, [('munin', 'localhost')])
def test_one_command(self): commands = process_arguments('postgres') self.assertEquals(commands, [('postgres', None)])