'Test for inserting all column types into a Model
test_can_insert_model_with_all_column_types tests that each cqlengine column type can be inserted into a Model.
It first creates a Model that has each cqlengine column type. It then creates a Model instance where all the fields
have corresponding data, which performs the insert into the Cassandra table.
Finally, it verifies that each column read from the Model from Cassandra is the same as the input parameters.
@since 2.6.0
@jira_ticket PYTHON-246
@expected_result The Model is inserted with each column type, and the resulting read yields proper data for each column.
@test_category data_types:primitive'

@greaterthanorequalcass3_10
def test_can_insert_model_with_all_column_types(self):

    class AllDatatypesModel(Model, ):
        id = columns.Integer(primary_key=True)
        a = columns.Ascii()
        b = columns.BigInt()
        c = columns.Blob()
        d = columns.Boolean()
        e = columns.DateTime()
        f = columns.Decimal()
        g = columns.Double()
        h = columns.Float()
        i = columns.Inet()
        j = columns.Integer()
        k = columns.Text()
        l = columns.TimeUUID()
        m = columns.UUID()
        n = columns.VarInt()
        o = columns.Duration()
    sync_table(AllDatatypesModel)
    input = ['ascii', ((2 ** 63) - 1), bytearray('hello    world'), True, datetime.utcfromtimestamp(872835240), Decimal('12.3E+7'), 2.39, 3.4028234663852886e+38, '123.123.123.123', 2147483647, 'text', UUID('FE2B4360-28C6-11E2-81C1-0800200C9A66'), UUID('067e6162-3b6f-4ae2-a171-2470b63dff00'), int((str(2147483647) + '000'))]
    AllDatatypesModel.create(id=0, a='ascii', b=((2 ** 63) - 1), c=bytearray('hello    world'), d=True, e=datetime.utcfromtimestamp(872835240), f=Decimal('12.3E+7'), g=2.39, h=3.4028234663852886e+38, i='123.123.123.123', j=2147483647, k='text', l=UUID('FE2B4360-28C6-11E2-81C1-0800200C9A66'), m=UUID('067e6162-3b6f-4ae2-a171-2470b63dff00'), n=int((str(2147483647) + '000')), o=Duration(2, 3, 4))
    self.assertEqual(1, AllDatatypesModel.objects.count())
    output = AllDatatypesModel.objects.first()
    for (i, i_char) in enumerate(range(ord('a'), (ord('a') + 14))):
        self.assertEqual(input[i], output[chr(i_char)])
