cpath tests, rely more on it

This commit is contained in:
Dima Gerasimov 2020-05-04 08:53:41 +01:00
parent 8b8a85e8c3
commit 55ac85c7e7
3 changed files with 10 additions and 13 deletions

View file

@ -9,7 +9,7 @@ from typing import Dict, List, Optional, Iterator
from datetime import datetime
from .common import LazyLogger, get_files, group_by_key, cproperty, make_dict
from .kython.kompress import open as kopen
from .kython.kompress import CPath
from my.config import rtm as config
@ -80,7 +80,7 @@ class MyTodo:
class DAL:
def __init__(self, data: bytes, revision=None) -> None:
def __init__(self, data: str, revision=None) -> None:
self.cal = icalendar.Calendar.from_ical(data)
self.revision = revision
@ -99,8 +99,7 @@ class DAL:
def dal():
last = get_files(config.export_path)[-1]
with kopen(last) as fo:
data = fo.read()
data = CPath(last).read_text() # TODO make it automatic
return DAL(data=data, revision='TODO')