Example #1
0
def test_update_required_after_12_hours(tmpdir):
    e = EbooksText(Config)
    e._write_timestamp()
    with freeze_time(datetime.datetime.now() + datetime.timedelta(hours=13)):
        assert e._update_required()
Example #2
0
def test_update_required_if_timestamp(tmpdir):
    e = EbooksText(Config)
    e._write_timestamp()
    assert not e._update_required()
Example #3
0
def test_update_required(tmpdir):
    e = EbooksText(Config)
    assert e._update_required()
Example #4
0
def test_update_required_after_12_hours(tmpdir):
    e = EbooksText(Config)
    e._write_timestamp()
    with freeze_time(datetime.datetime.now() + datetime.timedelta(hours=13)):
        assert e._update_required()
Example #5
0
def test_update_required_if_timestamp(tmpdir):
    e = EbooksText(Config)
    e._write_timestamp()
    assert not e._update_required()
Example #6
0
def test_update_required(tmpdir):
    e = EbooksText(Config)
    assert e._update_required()