Best Python code snippet using localstack_python
tests.py
Source:tests.py
2from .utils import snake_to_camel_case, convert_field_names, calendar_options3class CamelCaseTest(TestCase):4 def test_one_word_variable(self):5 s = 'one'6 self.assertEqual(snake_to_camel_case(s), 'one')7 def test_two_word_variable(self):8 s = 'two_word'9 self.assertEqual(snake_to_camel_case(s), 'twoWord')10 def test_three_word_variable(self):11 s = 'three_word_variable'12 self.assertEqual(snake_to_camel_case(s), 'threeWordVariable')13 def test_startswith_one_underscore(self):14 s = '_one_under'15 self.assertEqual(snake_to_camel_case(s), '_oneUnder')16 def test_startswith_two_underscores(self):17 s = '__two_under'18 self.assertEqual(snake_to_camel_case(s), '__twoUnder')19 def test_starts_ends_with_one_underscore(self):20 s = '_one_under_'21 self.assertEqual(snake_to_camel_case(s), '_oneUnder_')22 23 def test_starts_ends_with_two_underscores(self):24 s = '__two_under__'25 self.assertEqual(snake_to_camel_case(s), '__twoUnder__')26class ConvertFieldNames(TestCase):27 def test_conversion(self):28 l = [{'start': '2013-11-27', 29 'end': '2013-11-29', 30 '__size__': 1, 31 }]32 self.assertEqual(convert_field_names(l), [{33 'start': '2013-11-27', 34 'end': '2013-11-29', 35 '__size__': 1, 36 }])37class CalendarOptions(TestCase):38 def test_options_string(self):39 s = '{timeFormat: "H:mm", header: {left: "prev,next today", center: "title", right: "month,agendaWeek,agendaDay",}' ...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!