'Simple test to ensure the DesBytesTypeByteArray deserializer functionally works
@since 3.1
@jira_ticket PYTHON-503
@expected_result byte array should be deserialized appropriately.
@test_category queries:custom_payload'

@unittest.skipIf((not hasattr(cassandra, 'deserializers')), 'Cython    required    for    to    test    DesBytesTypeArray    deserializer')
def test_des_bytes_type_array(self):

    original = None
    try:
        original = cassandra.deserializers.DesBytesType
        cassandra.deserializers.DesBytesType = cassandra.deserializers.DesBytesTypeByteArray
        s = self.session
        s.execute('CREATE    TABLE    blobbytes2    (a    ascii    PRIMARY    KEY,    b    blob)')
        params = ['key1', bytearray('blob1')]
        s.execute('INSERT    INTO    blobbytes2    (a,    b)    VALUES    (%s,    %s)', params)
        results = s.execute('SELECT    *    FROM    blobbytes2')[0]
        for (expected, actual) in zip(params, results):
            self.assertEqual(expected, actual)
    finally:
        if (original is not None):
            cassandra.deserializers.DesBytesType = original
