From a4dfdc82749873fefac1d0a5a411e178ed9f6da9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Barth Date: Mon, 23 Nov 2015 14:04:14 +0100 Subject: [PATCH] Add basic tests for moto.core.utils.camelcase_to_underscores() --- tests/test_core/test_utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/test_core/test_utils.py diff --git a/tests/test_core/test_utils.py b/tests/test_core/test_utils.py new file mode 100644 index 000000000..3e483819a --- /dev/null +++ b/tests/test_core/test_utils.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +import sure + +from moto.core.utils import camelcase_to_underscores + + +def test_camelcase_to_underscores(): + cases = { + "theNewAttribute": "the_new_attribute", + "attri bute With Space": "attribute_with_space", + "FirstLetterCapital": "first_letter_capital", + } + for arg, expected in cases.items(): + camelcase_to_underscores(arg).should.equal(expected)