Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin committed Nov 19, 2024
1 parent 4083efd commit 916177c
Show file tree
Hide file tree
Showing 3 changed files with 3,442 additions and 162 deletions.
8 changes: 7 additions & 1 deletion test_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import datetime
import importlib
import json
import os
Expand All @@ -24,6 +25,10 @@
from converter_app.models import File
from converter_app.readers import READERS as registry

def _json_default(o):
if isinstance(o, (datetime.date, datetime.datetime)):
return o.isoformat()


def generate_expected_results(src_path, file, res_path, _unused):
src_path_file = os.path.join(src_path, file)
Expand All @@ -42,7 +47,8 @@ def generate_expected_results(src_path, file, res_path, _unused):
reader = registry.match_reader(File(file_storage))
if reader:
reader.process()
content = json.dumps(reader.as_dict)
content = json.dumps(reader.as_dict,
default=_json_default)
with open(final_targe_file, 'w+', encoding='utf8') as f_res:
f_res.write(content)
f_res.close()
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 916177c

Please sign in to comment.