Skip to content

Commit f2a40f8

Browse files
committed
fixing test for older py 3
1 parent 44753e6 commit f2a40f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_serialization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
import json
34
import pytest
45
from deepdiff import DeepDiff
56

@@ -73,5 +74,5 @@ class B:
7374
ddiff = DeepDiff(t1, t2)
7475
default_mapping = {A: lambda x: 'obj A', B: lambda x: 'obj B'}
7576
result = ddiff.to_json(default_mapping=default_mapping)
76-
expected_result = r'{"type_changes": {"root": {"old_type": "A", "new_type": "B", "old_value": "obj A", "new_value": "obj B"}}}'
77-
assert expected_result == result
77+
expected_result = {"type_changes": {"root": {"old_type": "A", "new_type": "B", "old_value": "obj A", "new_value": "obj B"}}}
78+
assert expected_result == json.loads(result)

0 commit comments

Comments
 (0)