'Test that get_value logs an error if json data is not valid.'

def test_invalid_data_error_on_get_value(self):

    from openedx.core.djangoapps.site_configuration.models import logger
    invalid_data = [self.test_config1]
    site_configuration = SiteConfigurationFactory.create(site=self.site, values=invalid_data)
    with patch.object(logger, 'exception') as mock_logger:
        self.assertEqual(site_configuration.get_value('university'), None)
        self.assertTrue(mock_logger.called)
    with patch.object(logger, 'exception') as mock_logger:
        value = site_configuration.get_value('platform_name', 'Default    Platform    Name')
        self.assertTrue(mock_logger.called)
        self.assertEqual(value, 'Default    Platform    Name')
