1
0
personal-data/test/test_csv_import.py
Jon Michael Aanes 72be664d82
All checks were successful
Test Python / Test (push) Successful in 31s
Ruff
2024-10-13 15:20:30 +02:00

25 lines
635 B
Python

import datetime
import frozendict
from personal_data.csv_import import determine_possible_keys
def test_determine_possible_keys():
data = frozendict.frozendict(
{
'game.name': 'Halo',
'me.last_played_time': datetime.datetime(
2021, 6, 13, 19, 12, 21, tzinfo=datetime.timezone.utc,
),
'trophy.name': 'Test',
'trophy.desc': 'Description',
},
)
keys = determine_possible_keys(data)
assert keys.time_start == []
assert keys.time_end == ['me.last_played_time']
assert keys.duration == []
assert len(keys.name) == 3