예제 #1
0
 def test_get_max_length_max_length_is_none_and_choices_is_not_empty(self):
     choices = [
         ('key1', 'value1'),
         ('key2', 'value2'),
         ('key3', 'value3'),
     ]
     self.assertEqual(get_max_length(choices, None), 14)
 def test_get_max_length_max_length_is_none_and_choices_is_not_empty(self):
     choices = [
         ('key1', 'value1'),
         ('key2', 'value2'),
         ('key3', 'value3'),
     ]
     self.assertEqual(get_max_length(choices, None), 14)
 def test_get_max_length_max_length_is_none_and_choices_is_empty(self):
     self.assertEqual(get_max_length([], None), 200)
 def test_get_max_length_max_length_is_not_none(self):
     self.assertEqual(get_max_length([], 5), 5)
예제 #5
0
 def test_get_max_length_max_length_is_none_and_choices_is_empty(self):
     self.assertEqual(get_max_length([], None), 200)
예제 #6
0
 def test_get_max_length_max_length_is_not_none(self):
     self.assertEqual(get_max_length([], 5), 5)
예제 #7
0
 def test_get_max_length_max_length_is_none_and_choices_is_not_empty(self):
     choices = [("key1", "value1"), ("key2", "value2"), ("key3", "value3")]
     self.assertEqual(get_max_length(choices, None), 14)