def test_with_curr_equal_lat(self):
     self.mock_check_php.return_value = True
     self.mock_calculate.return_value = 'connections'
     self.mock_find_max.return_value = {'version': '3.4.3'}
     dependency_solver('3.4.3', 'deps', '3.4.3')
     self.mock_break = self.set_up_patch('sys.exit')
     self.mock_break.side_effect = Exception
     self.assertTrue(self.mock_break.terminated)
 def test_dependency_solver_correct(self):
     self.mock_check_php.return_value = True
     self.mock_calculate.return_value = 'connections'
     self.mock_find_max.return_value = {'version': '3.4.3'}
     res = dependency_solver('3.4.2', 'deps', '3.4.3')
     self.mock_find_max.assert_called_once_with('connections')
     self.mock_check_php.assert_called_once_with('connections', SERVER_CONFIG)
     self.mock_calculate.assert_called_once_with('3.4.2', 'deps')
     self.assertEqual(res, (True, {0: {'version': '3.4.3'}}))
 def test_dependency_solver_with_php_error(self):
     self.mock_check_php.return_value = False
     res = dependency_solver('3.4.2', 'deps', '3.4.3')
     self.assertEqual(res, (False, 'No solution found for this Server-Config'))