Ejemplo n.º 1
0
 def test_field2long_strips_trailing_long_symbol(self):
     from ZPublisher.Converters import field2long
     to_convert = "2L"
     expected = 2
     self.assertEqual(field2long(to_convert), expected)
Ejemplo n.º 2
0
 def test_field2long_with_regular_number(self):
     from ZPublisher.Converters import field2long
     to_convert = "1"
     expected = 1
     self.assertEqual(field2long(to_convert), expected)
Ejemplo n.º 3
0
 def test_field2long_with_list_of_numbers(self):
     from ZPublisher.Converters import field2long
     to_convert = ["1", "2", "3"]
     expected = [1, 2, 3]
     self.assertEqual(field2long(to_convert), expected)
Ejemplo n.º 4
0
 def test_field2long_strips_trailing_long_symbol(self):
     from ZPublisher.Converters import field2long
     to_convert = "2L"
     expected = 2
     self.assertEqual(field2long(to_convert), expected)
Ejemplo n.º 5
0
 def test_field2long_with_regular_number(self):
     from ZPublisher.Converters import field2long
     to_convert = "1"
     expected = 1
     self.assertEqual(field2long(to_convert), expected)
Ejemplo n.º 6
0
 def test_field2long_with_list_of_numbers(self):
     from ZPublisher.Converters import field2long
     to_convert = ["1", "2", "3"]
     expected = [1, 2, 3]
     self.assertEqual(field2long(to_convert), expected)