Add moto.core.utils.underscores_to_camelcase()
This commit is contained in:
parent
a4dfdc8274
commit
a06f8b15f5
2 changed files with 25 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
import sure
|
||||
|
||||
from moto.core.utils import camelcase_to_underscores
|
||||
from moto.core.utils import camelcase_to_underscores, underscores_to_camelcase
|
||||
|
||||
|
||||
def test_camelcase_to_underscores():
|
||||
|
|
@ -12,3 +12,11 @@ def test_camelcase_to_underscores():
|
|||
}
|
||||
for arg, expected in cases.items():
|
||||
camelcase_to_underscores(arg).should.equal(expected)
|
||||
|
||||
|
||||
def test_underscores_to_camelcase():
|
||||
cases = {
|
||||
"the_new_attribute": "theNewAttribute",
|
||||
}
|
||||
for arg, expected in cases.items():
|
||||
underscores_to_camelcase(arg).should.equal(expected)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue