Exemplo n.º 1
0
 def test_arguments_rfs2971_with_max_value_length(self):
     with self.assertRaises(ValueError):
         value = 'test' * (ID_MAX_VALUE_LEN + 1)
         arguments_rfs2971(field=value)
Exemplo n.º 2
0
 def test_arguments_rfs2971_with_max_items(self):
     with self.assertRaises(ValueError):
         fields = range(31)
         arguments_rfs2971(**{str(field): field for field in fields})
Exemplo n.º 3
0
 def test_arguments_rfs2971_with_max_field_length(self):
     with self.assertRaises(ValueError):
         field = 'test' * (ID_MAX_FIELD_LEN + 1)
         arguments_rfs2971(**{field: 'test'})
Exemplo n.º 4
0
 def test_arguments_rfs2971_empty(self):
     self.assertEqual(['NIL'], arguments_rfs2971())
Exemplo n.º 5
0
 def test_arguments_rfs2971_with_kwargs(self):
     self.assertEqual(['(', '"name"', '"test"', ')'], arguments_rfs2971(name='test'))
Exemplo n.º 6
0
 def test_arguments_rfs2971_with_max_value_length(self):
     with self.assertRaises(ValueError):
         value = 'test' * (ID_MAX_VALUE_LEN + 1)
         arguments_rfs2971(field=value)
Exemplo n.º 7
0
 def test_arguments_rfs2971_with_max_field_length(self):
     with self.assertRaises(ValueError):
         field = 'test' * (ID_MAX_FIELD_LEN + 1)
         arguments_rfs2971(**{field: 'test'})
Exemplo n.º 8
0
 def test_arguments_rfs2971_with_max_items(self):
     with self.assertRaises(ValueError):
         fields = range(31)
         arguments_rfs2971(**{str(field): field for field in fields})
Exemplo n.º 9
0
 def test_arguments_rfs2971_with_kwargs(self):
     self.assertEqual(['(', '"name"', '"test"', ')'],
                      arguments_rfs2971(name='test'))
Exemplo n.º 10
0
 def test_arguments_rfs2971_empty(self):
     self.assertEqual(['NIL'], arguments_rfs2971())