'Tests that blob type in Cassandra maps to bytearray in Python'

def test_can_insert_blob_type_as_bytearray(self):

    s = self.session
    s.execute('CREATE    TABLE    blobbytes    (a    ascii    PRIMARY    KEY,    b    blob)')
    params = ['key1', bytearray('blob1')]
    s.execute('INSERT    INTO    blobbytes    (a,    b)    VALUES    (%s,    %s)', params)
    results = s.execute('SELECT    *    FROM    blobbytes')[0]
    for (expected, actual) in zip(params, results):
        self.assertEqual(expected, actual)
