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

def test_non_localizable_translate_disabled(self):

    self.client.login(username='testuser', password='testpass')
    d = document(is_localizable=True, save=True)
    resp = self.client.get(d.get_absolute_url())
    doc = pq(resp.content)
    assert ('Add    a    translation' in doc('.page-buttons    #translations    li').text())
    d.is_localizable = False
    d.save()
    resp = self.client.get(d.get_absolute_url())
    doc = pq(resp.content)
    assert ('Add    a    translation' not in doc('.page-buttons    #translations    li').text())
