def test_match(self): # Match - Satellite 5 with java-1.7.0-ibm input_data = {'alternatives_display_java': ALTERNATIVES_IBM_170} expected = {'java_alternative': ALTERNATIVE_IBM_170} self.assertEqual(expected, sat5_correct_java.main(input_data)) # Match - Satellite 5 with java-1.8.0-openjdk input_data = {'alternatives_display_java': ALTERNATIVES_OPENJDK} expected = {'java_alternative': ALTERNATIVE_OPENJDK} self.assertEqual(expected, sat5_correct_java.main(input_data))
def test_error(self): # Match - Satellite 5 with no java installed should produce error input_data = {'alternatives_display_java': ALTERNATIVES_NONE} expected = { 'error': 'No java installed or alternatives system missing/missbehaves?' } self.assertEqual(expected, sat5_correct_java.main(input_data))
def test_error(self): # Match - Satellite 5 with no java installed should produce error input_data = {'alternatives_display_java': ALTERNATIVES_NONE} expected = {'error': 'No java installed or alternatives system missing/missbehaves?'} self.assertEqual(expected, sat5_correct_java.main(input_data))
def test_no_match(self): # No match - Satellite 5 with java-1.6.0-ibm input_data = {'alternatives_display_java': ALTERNATIVES_IBM_160} self.assertEqual(None, sat5_correct_java.main(input_data))