graphene-django/graphene_django/utils/tests/test_str_converters.py
Jean-Louis Fuchs 08d0cce55a
Move to_const function from Graphene into Graphene-Django (#992) (#996)
Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
2020-06-27 10:43:25 +01:00

10 lines
249 B
Python

from ..str_converters import to_const
def test_to_const():
assert to_const('snakes $1. on a "#plane') == "SNAKES_1_ON_A_PLANE"
def test_to_const_unicode():
assert to_const(u"Skoða þetta unicode stöff") == "SKODA_THETTA_UNICODE_STOFF"