示例#1
0
 def testDictFromTogglEntry(self):
     input = TogglEntry(None, 120, "2016-03-02T01:01:01", 777,
                        "test SLUG-333", self.jira_config)
     result = JiraHelper.dictFromTogglEntry(input)
     self.assertEquals("SLUG-333", result["issueId"])
     self.assertEquals("2016-03-02T01:01:01", result["started"])
     self.assertEquals(120, result["seconds"])
     self.assertEquals("test SLUG-333 [toggl#777]", result["comment"])
示例#2
0
 def testDictFromTogglEntry_time_is_rounded(self):
     input = TogglEntry(None, 151, "2016-03-02T01:01:01", 777,
                        "test SLUG-333", self.jira_config)
     result = JiraHelper.dictFromTogglEntry(input)
     self.assertEquals(180, result["seconds"])