Ejemplo n.º 1
0
 def canonicalize(cls):
     """
     Transforms the values in `city_name` and `county_name`
     to their canonicalized (uppercase, regulare spaced) form.
     """
     for obj in cls.objects.all():
         obj.city_name = canonicalize_string(obj.city_name)
         obj.county_name = canonicalize_string(obj.county_name)
         obj.save()
 def canonicalize(cls):
     """
     Transforms the values in `city_name` and `county_name`
     to their canonicalized (uppercase, regulare spaced) form.
     """
     for obj in cls.objects.all():
         obj.city_name = canonicalize_string(obj.city_name)
         obj.county_name = canonicalize_string(obj.county_name)
         obj.save()
def test_canonicalize_string():
    assert helpers.canonicalize_string(" Däytön\n") == "DÄYTÖN"
Ejemplo n.º 4
0
def test_canonicalize_string():
    raw = ' Däytön\n'
    assert h.canonicalize_string(raw) == 'DÄYTÖN'
Ejemplo n.º 5
0
def test_canonicalize_string():
    raw = " Däytön\n"
    assert h.canonicalize_string(raw) == "DÄYTÖN"