Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit df00954bcc - Show all commits

View File

@ -129,7 +129,7 @@ def check_fields(data: dict, fields: dict = None):
"""
assert set(data.keys()) == set(fields.keys())
for key in data:
if key in ("moduleimpl_id", "desc", "user_id", "external_data"):
if key in ("moduleimpl_id", "desc", "external_data"):
assert (
isinstance(data[key], fields[key]) or data[key] is None
), f"error [{key}:{type(data[key])}, {data[key]}, {fields[key]}]"

View File

@ -6,6 +6,7 @@ Ecrit par HARTMANN Matthias
"""
from random import randint
from types import NoneType
from tests.api.setup_test_api import (
GET,
@ -34,7 +35,8 @@ ASSIDUITES_FIELDS = {
"etat": str,
"desc": str,
"entry_date": str,
"user_id": str,
"user_id": (int, NoneType),
"user_name": (str, NoneType),
"est_just": bool,
"external_data": dict,
}