<s> from asyncflux import AsyncfluxClient <EOL> from asyncflux . testing import AsyncfluxTestCase <EOL> from asyncflux . util import snake_case , snake_case_dict <EOL> class TestAsyncfluxCoroutine ( AsyncfluxTestCase ) : <EOL> def test_non_callable ( self ) : <EOL> client = AsyncfluxClient ( ) <EOL> with self . assertRaisesRegexp ( TypeError , '<STR_LIT>' ) : <EOL> client . get_databases ( callback = '<STR_LIT>' ) <EOL> class TestSnakeCase ( AsyncfluxTestCase ) : <EOL> def test_snake_case ( self ) : <EOL> values = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> ] <EOL> for raw_string , snake in values : <EOL> self . assertEqual ( snake_case ( raw_string ) , snake ) <EOL> def test_snake_case_dict ( self ) : <EOL> raw_dict = { <EOL> '<STR_LIT:name>' : '<STR_LIT:foo>' , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> snake_dict = { <EOL> '<STR_LIT:name>' : '<STR_LIT:foo>' , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . assertDictEqual ( snake_case_dict ( raw_dict ) , snake_dict ) </s>
