#!/usr/bin/env python # coding=utf8 from slugger import Slugger s = Slugger('de', hanlang='ja') print s.sluggify(u'Hellö & Wörld 漢字') print s.sluggify(u'And they lived happily ever after!')
def test_simple_slug(): s = Slugger('de', hanlang='ja') assert s.sluggify(u'Hellö & Wörld 漢字') == u'helloe-und-woerld-kanji' assert s.sluggify(u'And they lived happily ever after!') == \ u'and-they-lived-happily-ever-after'