def testReplaceVariables(self): sync = Sync() timepointTuple = (2013, 2, 9, 7, 8, 3, 0, 0, 0) timepoint = time.mktime(timepointTuple) self.assertEquals("2013.02.09", sync.replaceVariables("{year}.{month}.{dayOfMonth}", timepoint)) self.assertEquals("07:08:03", sync.replaceVariables("{hour}:{minute}:{second}", timepoint)) self.assertEquals("week_05 Sat", sync.replaceVariables("week_{week} {dayOfWeek}", timepoint))