def test_last_auto_index_time(es_cdlc):
    assert_that(CustomDLC.latest_auto_time()).is_none()

    # this cdlc IS NOT the earliest in the index, so it will be considered non-continuous
    CustomDLC(_id=49792).update(from_auto_index=True)
    assert_that(CustomDLC.latest_auto_time()).is_none()
    assert_that(CustomDLC.earliest_not_auto()).is_equal_to(1589092730)

    # this cdlc IS the earliest in the index, so it AND ONLY IT will be considered continuous
    CustomDLC(_id=49706).update(from_auto_index=True)
    assert_that(CustomDLC.latest_auto_time()).is_equal_to(1589092730)
    assert_that(CustomDLC.earliest_not_auto()).is_equal_to(1589162625)

    # after this, all cdlcs marked as indexed are continuous, since no unmarked cdlcs are in between
    CustomDLC(_id=12990).update(from_auto_index=True)
    assert_that(CustomDLC.latest_auto_time()).is_equal_to(1589249216)
    assert_that(CustomDLC.earliest_not_auto()).is_equal_to(1589377216)
 def __enter__(self):
     self.__start_from = CustomDLC.latest_auto_time() if self.__continuous else None