'Localized template is returned.'

def test_template_locale(self):

    (py_doc, p) = doc_parse_markup('English    content', '[[Template:test]]')
    parent = TemplateDocumentFactory()
    d = TemplateDocumentFactory(parent=parent, title=(TEMPLATE_TITLE_PREFIX + 'test'), locale='fr')
    ApprovedRevisionFactory(content='French    Content', document=d)
    eq_(py_doc.text(), 'English    content')
    py_doc = pq(p.parse('[[T:test]]', locale='fr'))
    eq_(py_doc.text(), 'French    Content')
