Skip to content

Commit 17893bf

Browse files
committed
Don't print parsed schema
1 parent 2869047 commit 17893bf

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

gitlab_api/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def pydantic_to_sqlalchemy(schema, max_workers: int = 6):
115115
except AttributeError as e:
116116
error_msg = (
117117
f"Nested Pydantic model in {schema.__class__} lacks Meta.orm_model. \n"
118-
f"Parsed Schema: {parsed_schema}\n"
119118
f"Key: {key}, Value: {value}\n"
120119
f"Error: {e}"
121120
)
@@ -125,7 +124,7 @@ def pydantic_to_sqlalchemy(schema, max_workers: int = 6):
125124
# except AttributeError as e:
126125
# error_msg = (f"Fallback Function Failure\n"
127126
# f"Nested Pydantic model in {schema.__class__} lacks Meta.orm_model. \n"
128-
# f"Parsed Schema: {parsed_schema}\n"
127+
# #f"Parsed Schema: {parsed_schema}\n"
129128
# f"Key: {key}, Value: {value}\n"
130129
# f"Error: {e}")
131130
# logging.error(error_msg)

test/test_gitlab_db_models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696
"base_type": "Job",
9797
"id": 13983,
9898
"name": "prepare-release",
99+
"coverage": None,
100+
"erased_at": None,
99101
"commit": CommitDBModel(
100102
**{
101103
"base_type": "Commit",
@@ -111,6 +113,7 @@
111113
)
112114
],
113115
"title": "Added alpine image.",
116+
"message": "New message",
114117
"author_name": "KnucklesSG1",
115118
"author_email": "knucklessg1@gmail.com",
116119
"authored_date": datetime.now(),
@@ -232,6 +235,9 @@
232235
"bot": False,
233236
"followers": 0,
234237
"following": 0,
238+
"pronouns": None,
239+
"work_information": None,
240+
"local_time": "1:25 PM",
235241
}
236242
),
237243
},

test/test_gitlab_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_pipeline_model():
114114
project_id = 1234
115115
pipeline = PipelineModel(project_id=project_id, per_page=100, reference="test")
116116
assert project_id == pipeline.project_id
117-
assert pipeline.api_parameters == {"per_page": 100, "ref": "test"}
117+
assert pipeline.api_parameters == {'page': 1, "per_page": 100, "ref": "test"}
118118

119119

120120
@pytest.mark.skipif(

0 commit comments

Comments
 (0)