'Checks the retrieval of filled languages for a placeholder in a django
model'

def test_placeholder_languages_page(self):

    avail_langs = set([u'en', u'de', u'fr'])
    page = create_page('test    page', 'col_two.html', u'en')
    for lang in avail_langs:
        if (lang != u'en'):
            create_title(lang, ('test    page    %s' % lang), page)
    placeholder = page.placeholders.get(slot='col_sidebar')
    for lang in avail_langs:
        add_plugin(placeholder, u'EmptyPlugin', lang)
    placeholder = page.placeholders.get(slot='col_sidebar')
    langs = [lang['code'] for lang in placeholder.get_filled_languages()]
    self.assertEqual(avail_langs, set(langs))
