From b05c273eae3f19387ab0a6afea4277afd52a9378 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Mon, 7 Jun 2021 19:44:31 +0300 Subject: db: test_db: Add extra variable in test data for "id" --- tests/unit/db/test_db.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/db/test_db.py b/tests/unit/db/test_db.py index 485678f..520e781 100644 --- a/tests/unit/db/test_db.py +++ b/tests/unit/db/test_db.py @@ -74,15 +74,14 @@ class TestCrudMethods(TestCase): db_mock = mock.MagicMock() with db_mock.cursor() as cursor: test_data = ( - 35, "Rob", ('{"pages": ' - '{"old": "5099-5109", ' - '"new": "5099-5110"}, ' - '"month": {"old": "July", ' - '"new": "June"}, ' - '"year": {"old": "2001", ' - '"new": "2002"}}'), - "2021-06-04 09:01:05" - ) + 1, 35, "Rob", ('{"pages": ' + '{"old": "5099-5109", ' + '"new": "5099-5110"}, ' + '"month": {"old": "July", ' + '"new": "June"}, ' + '"year": {"old": "2001", ' + '"new": "2002"}}'), + "2021-06-04 09:01:05") cursor.fetchall.return_value = (test_data,) metadata = list(fetchall(db_mock, "metadata_audit", -- cgit v1.2.3