'Test to ensure that same named results are surfaced in the NamedTupleFactory
Creates a table with a few different text fields. Inserts a few values in that table.
It then fetches the values and confirms that despite all be being selected as the same name
they are propagated in the result set differently.
@since 3.3
@jira_ticket PYTHON-467
@expected_result duplicate named results have unique row names.
@test_category queries'

def test_sanitizing(self):

    for x in range(5):
        insert1 = "\n                                                                INSERT    INTO    {0}.{1}\n                                                                                (    k    ,    v1,    v2,    v3    )\n                                                                VALUES\n                                                                                (    1    ,    'v1{2}',    'v2{2}','v3{2}'    )\n                                        ".format(self.keyspace_name, self.function_table_name, str(x))
        self.session.execute(insert1)
    query = 'SELECT    v1    AS    duplicate,    v2    AS    duplicate,    v3    AS    duplicate    from    {0}.{1}'.format(self.ks_name, self.function_table_name)
    rs = self.session.execute(query)
    row = rs[0]
    self.assertTrue(hasattr(row, 'duplicate'))
    self.assertTrue(hasattr(row, 'duplicate_'))
    self.assertTrue(hasattr(row, 'duplicate__'))
