vbabiy / djangorestframework-camel-case

Camel case JSON support for Django REST framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug in function camel_to_underscore

szymi- opened this issue · comments

Something isn't right with camel_to_underscore function:

In [1]: from djangorestframework_camel_case.util import camel_to_underscore

In [2]: camel_to_underscore("test")
Out[2]: 'test'

In [3]: camel_to_underscore("TEST")
Out[3]: 'tes_t'

$ pip freeze | grep camel
djangorestframework-camel-case==1.2.0

The same issue

@szymi- can you please add a PR with a test case that shows this?

@vbabiy Hey! I have the same problem in my project, can I add a PR to fix it?