Пример #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)))