From f266da7b46d0919d7946156acfcdd03370384727 Mon Sep 17 00:00:00 2001 From: honglei Date: Fri, 25 Aug 2023 18:11:07 +0800 Subject: [PATCH] black/isort test_model_copy.py --- tests/test_model_copy.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/test_model_copy.py b/tests/test_model_copy.py index 30f7e0a..74cd534 100644 --- a/tests/test_model_copy.py +++ b/tests/test_model_copy.py @@ -3,7 +3,7 @@ from typing import Optional import pytest from pydantic import field_validator from pydantic.error_wrappers import ValidationError -from sqlmodel import SQLModel, create_engine, Session, Field +from sqlmodel import Field, Session, SQLModel, create_engine def test_model_copy(clear_sqlmodel): @@ -36,14 +36,18 @@ def test_model_copy(clear_sqlmodel): model_copy = hero.model_copy(update={"name": "Deadpond Copy"}) - assert model_copy.name == "Deadpond Copy" and \ - model_copy.secret_name == "Dive Wilson" and \ - model_copy.age == 25 + assert ( + model_copy.name == "Deadpond Copy" + and model_copy.secret_name == "Dive Wilson" + and model_copy.age == 25 + ) db_hero = session.get(Hero, hero.id) db_copy = db_hero.model_copy(update={"name": "Deadpond Copy"}) - assert db_copy.name == "Deadpond Copy" and \ - db_copy.secret_name == "Dive Wilson" and \ - db_copy.age == 25 + assert ( + db_copy.name == "Deadpond Copy" + and db_copy.secret_name == "Dive Wilson" + and db_copy.age == 25 + )