'Test to ensure overwriting of primary keys in model inheritance is allowed
This is currently only an issue in PyPy. When PYTHON-504 is introduced this should
be updated error out and warn the user
@since 3.6.0
@jira_ticket PYTHON-576
@expected_result primary keys can be overwritten via inheritance
@test_category object_mapper'

def test_model_over_write(self):

    class TimeModelBase(Model, ):
        uuid = columns.TimeUUID(primary_key=True)
    class DerivedTimeModel(TimeModelBase, ):
        __table_name__ = 'derived_time'
        uuid = columns.TimeUUID(primary_key=True, partition_key=True)
        value = columns.Text(required=False)
    drop_table(DerivedTimeModel)
    sync_table(DerivedTimeModel)
    uuid_value = uuid1()
    uuid_value2 = uuid1()
    DerivedTimeModel.create(uuid=uuid_value, value='first')
    DerivedTimeModel.create(uuid=uuid_value2, value='second')
    DerivedTimeModel.objects.filter(uuid=uuid_value)
