From 0356c2e01f43448dcbdc3885075afd6388c91a2f Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:36:57 +0200 Subject: [PATCH] Add unit test for api_keys.deleted column --- test/unit/data/model/mapping/test_gxy_model_mapping.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unit/data/model/mapping/test_gxy_model_mapping.py b/test/unit/data/model/mapping/test_gxy_model_mapping.py index 4ce0e1aa55d5..fc4adc4e95cc 100644 --- a/test/unit/data/model/mapping/test_gxy_model_mapping.py +++ b/test/unit/data/model/mapping/test_gxy_model_mapping.py @@ -104,8 +104,8 @@ def test_table(self, cls_): assert cls_.__tablename__ == "api_keys" def test_columns(self, session, cls_, user): - create_time, user_id, key = now(), user.id, get_unique_value() - obj = cls_(user_id=user_id, key=key, create_time=create_time) + create_time, user_id, key, deleted = now(), user.id, get_unique_value(), True + obj = cls_(user_id=user_id, key=key, create_time=create_time, deleted=deleted) with dbcleanup(session, obj) as obj_id: stored_obj = get_stored_obj(session, cls_, obj_id) @@ -113,6 +113,7 @@ def test_columns(self, session, cls_, user): assert stored_obj.create_time == create_time assert stored_obj.user_id == user_id assert stored_obj.key == key + assert stored_obj.deleted == deleted def test_relationships(self, session, cls_, user): obj = cls_(user_id=user.id, key=get_unique_value())