DMSC Integration Testing

Last updated: December 16, 2025 19:54:17

Test: ingestor|loki|dataset_found_is_not_old|

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

None

instrument = 'loki', coda_proposal_id = '999999'

def test_dataset_found_is_not_old(
instrument: str,
coda_proposal_id: str,
) -> None:
ds = scicat.get_latest_coda_dataset(
instrument=instrument, proposal_id=coda_proposal_id
)
creation_time = cast(datetime, ds.creation_time)
> assert creation_time > datetime.now(creation_time.tzinfo) - timedelta(hours=24)
E assert datetime.datetime(2025, 10, 9, 10, 41, 26, 245000, tzinfo=tzutc()) > (datetime.datetime(2025, 11, 10, 23, 15, 57, 407307, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2025, 11, 10, 23, 15, 57, 407307, tzinfo=tzutc()) = (tzutc())
E + where = datetime.now
E + and tzutc() = datetime.datetime(2025, 10, 9, 10, 41, 26, 245000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)

tests/ingestor/ingestor_test.py:59: AssertionError

None

None

None

None

None

None

None

None

None

None

None

None

None

None