'Non localizable document doesn\'t show tab for \'Localize\'.'

def test_non_localizable_translate_disabled(self):

    u = UserFactory()
    self.client.login(username=u.username, password='testpass')
    d = DocumentFactory(is_localizable=True)
    resp = self.client.get(d.get_absolute_url())
    doc = pq(resp.content)
    assert ('Translate' in doc('#doc-tools    li').text())
    d.is_localizable = False
    d.save()
    resp = self.client.get(d.get_absolute_url())
    doc = pq(resp.content)
    assert ('Localize' not in doc('#doc-tools    li').text())
