'Test that get_value_for_org returns correct value for any given key.'

def test_get_value_for_org(self):

    test_org = test_config['course_org_filter']
    with with_site_configuration_context(configuration=test_config):
        self.assertEqual(configuration_helpers.get_value_for_org(test_org, 'university'), test_config['university'])
        self.assertEqual(configuration_helpers.get_value_for_org(test_org, 'css_overrides_file'), test_config['css_overrides_file'])
        self.assertItemsEqual(configuration_helpers.get_value_for_org(test_org, 'REGISTRATION_EXTRA_FIELDS'), test_config['REGISTRATION_EXTRA_FIELDS'])
        self.assertEqual(configuration_helpers.get_value_for_org(test_org, 'non_existent_key'), None)
        self.assertEqual(configuration_helpers.get_value_for_org(test_org, 'non_existent_key', 'default    for    non    existent'), 'default    for    non    existent')
        self.assertEqual(configuration_helpers.get_value_for_org('missing_org', 'university', 'default    for    non    existent'), 'default    for    non    existent')
