コード例 #1
0
 def test_can_advance_by_arbitrary_days(self):
     fake = FakeDatetime()
     days = 8
     start = fake.now()
     fake.advance(days=days)
     expect(fake.now()).to(equal(start + timedelta(days=days)))
コード例 #2
0
 def test_can_advance_by_arbitrary_hours(self):
     fake = FakeDatetime()
     hours = 23
     start = fake.now()
     fake.advance(hours=hours)
     expect(fake.now()).to(equal(start + timedelta(hours=hours)))
コード例 #3
0
 def test_can_advance_by_arbitrary_sec(self):
     fake = FakeDatetime()
     sec = 235
     start = fake.now()
     fake.advance(seconds=sec)
     expect(fake.now()).to(equal(start + timedelta(seconds=sec)))
コード例 #4
0
 def test_can_advance_by_arbitrary_minutes(self):
     fake = FakeDatetime()
     mins = 4
     start = fake.now()
     fake.advance(minutes=mins)
     expect(fake.now()).to(equal(start + timedelta(minutes=mins)))
コード例 #5
0
 def test_can_advance_by_arbitrary_ms(self):
     fake = FakeDatetime()
     ms = 235
     start = fake.now()
     fake.advance(milliseconds=ms)
     expect(fake.now()).to(equal(start + timedelta(milliseconds=ms)))