Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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
Example #4
0
 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