'Test option field representation'

def testOptions(self):

    r = S3Represent(options=self.test_opts, none='NONE')
    self.assertEqual(r(1), 'Test1')
    self.assertEqual(r.multiple([1, 2, 3]), 'Test1,    Test2,    Test3')
    self.assertEqual(r.bulk([1, 2, 3]), {1: 'Test1', 2: 'Test2', 3: 'Test3', None: 'NONE'})
    r = S3Represent(options=self.test_opts, none='NONE', multiple=True)
    self.assertEqual(r(1), 'Test1')
    self.assertEqual(r([1, 2]), 'Test1,    Test2')
    self.assertRaises(ValueError, r.multiple, [1, 2, 3])
    result = r.multiple([[1, 2]]).split(',    ')
    self.assertTrue(('Test1' in result))
    self.assertTrue(('Test2' in result))
    self.assertEqual(len(result), 2)
    result = r.multiple([[1, 2], [2, 3]]).split(',    ')
    self.assertTrue(('Test1' in result))
    self.assertTrue(('Test2' in result))
    self.assertTrue(('Test3' in result))
    self.assertEqual(len(result), 3)
    result = r.bulk([[1, 2], [2, 3]])
    self.assertEqual(len(result), 4)
    self.assertTrue((1 in result))
    self.assertEqual(result[1], 'Test1')
    self.assertTrue((2 in result))
    self.assertEqual(result[2], 'Test2')
    self.assertTrue((3 in result))
    self.assertEqual(result[3], 'Test3')
    self.assertTrue((None in result))
    self.assertEqual(result[None], 'NONE')
