Can I write a test in Pytest for an array (which consists of string elements) defined in SQLAlchemy like this
# The list of URLs of the product's images
product_images: Mapped[list[str]] = mapped_column(
ARRAY(item_type=String), comment="The list of image URLs for the products."
)
The test:
def test_product_table_has_product_images_column_of__data_type(self, product:ProductClass) -> None:
"""Test if the product images column is of String data type."""
assert isinstance(product.__table__.columns.product_images.type.item_type, String)
My tests seem to be passing though.