def test_to_sec(self): init_time = self.init_time dt = datetime.datetime(2012, 1, 1, 1, 0, 0, 0) expr_sec = _new()._delta_to_sec(dt - init_time) init(init_time) sec = to_sec(dt) self.assertEqual(sec, expr_sec)
def test_peer(self): init_time = self.init_time dt = datetime.datetime(2012, 1, 1, 1, 0, 0, 0) init(init_time) sec = to_sec(dt) expr_dt = to_dt(sec) self.assertEqual(dt, expr_dt)