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

def test_placeholder_languages_model(self):

    avail_langs = set([u'en', u'de', u'fr'])
    ex = Example1(char_1='one', char_2='two', char_3='tree', char_4='four')
    ex.save()
    for lang in avail_langs:
        add_plugin(ex.placeholder, u'EmptyPlugin', lang)
    ex = Example1.objects.get(pk=ex.pk)
    langs = [lang['code'] for lang in ex.placeholder.get_filled_languages()]
    self.assertEqual(avail_langs, set(langs))
