import pytest
from typing import Optional

from sqlmodel import Field, Session, SQLModel, create_engine
from sqlalchemy.exc import IntegrityError


def test_should_allow_duplicate_row_if_unique_constraint_is_not_passed(clear_sqlmodel):
    class Hero(SQLModel, table=True):
        id: Optional[int] = 