def _get_unique_slug(self): slug = slugify_el(self.name) unique_slug = slug num = 1 while WorkModel.objects.filter(slug=unique_slug).exists(): unique_slug = '{}-{}'.format(slug, num) num += 1 return unique_slug
def test_greek(self): self.assertEqual(slugify_el('ϒ Ϋ υ ϋ ΰ'), 'Y-Y-y-y-y')