def test_serialize(self): c = Calendar(target_hours_per_day=timedelta(hours=8.00)) c = c.add(Day("came 9 left 18", today)) data = c.dump() c2 = Calendar.load(data) s = ConsoleDayShower(c2).show_days(today, 1) assert re.search("Flex *01:00", s)
def test_time(self): c = Calendar() c = c.add(Day("came 9 left 15", today)) data = c.dump() c2 = Calendar.load(data) assert c2.days[today].came == time(9) assert c2.days[today].left == time(15)
def test_project(self): c = Calendar() c = c.add( Day(date_=today, project_name="EPG Support", project_time="08:00")) c = c.add_project("EPG Support") data = c.dump() c2 = Calendar.load(data) s = ConsoleDayShower(c2).show_days(today, 1) assert "EPG Support" in s assert "08:00" in s
def test_serialize(self): c = Calendar(default_project_name="Hello world") data = c.dump() c2 = Calendar.load(data) s = ConsoleDayShower(c2).show_days(today, 1) assert "Hello world" in s