Skip to content

Commit

Permalink
test: add more test cases for serializing dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Dec 13, 2024
1 parent 7f20658 commit c503783
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion openedx_events/event_bus/avro/tests/test_avro.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import io
import os
from datetime import datetime
from typing import List
from typing import List, Union
from unittest import TestCase
from uuid import UUID, uuid4

Expand Down Expand Up @@ -126,6 +126,12 @@ def generate_test_event_data_for_data_type(data_type): # pragma: no cover
)},
dict[str, LibraryLocatorV2]: {'key': LibraryLocatorV2.from_string('lib:MITx:reallyhardproblems')},
dict[str, LibraryUsageLocatorV2]: {'key': LibraryUsageLocatorV2.from_string('lb:MITx:reallyhardproblems:problem:problem1')},
dict[str, List[int]]: {'key': [1, 2, 3]},
dict[str, List[str]]: {'key': ["hi", "there"]},
dict[str, dict[str, str]]: {'key': {'key': 'value'}},
dict[str, dict[str, int]]: {'key': {'key': 1}},
dict[str, Union[str, int]]: {'key': 'value'},
dict[str, Union[str, int, float]]: {'key': 1.0},
}
data_dict = {}
for attribute in data_type.__attrs_attrs__:
Expand Down

0 comments on commit c503783

Please sign in to comment.