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)))
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)))
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)))
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)))
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)))