None
Test: ingestor|estia|dataset_found_is_not_old|
None
None
None
None
None
None
None
None
None
None
None
None
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 20, 23, 15, 8, 188147, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 20, 23, 15, 8, 188147, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 20, 19, 44, 8, 803892, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 20, 19, 44, 8, 803892, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 20, 12, 55, 17, 511914, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 20, 12, 55, 17, 511914, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 19, 23, 14, 57, 977614, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 19, 23, 14, 57, 977614, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 19, 20, 56, 55, 297812, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 19, 20, 56, 55, 297812, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 19, 11, 24, 0, 124230, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 19, 11, 24, 0, 124230, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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
)
tests/ingestor/ingestor_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:66: in get_latest_coda_dataset
ds_model = _get_latest_dataset_model(client, instrument, proposal_id)
.tox/ingestor/lib/python3.12/site-packages/dmsc_nightly/nexusfiles/scicat.py:22: in _get_latest_dataset_model
datasets = client.scicat.query_datasets(
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:839: in query_datasets
dsets_json = self._call_endpoint(
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1210: in _call_endpoint
response = self._send_to_scicat(cmd=cmd, url=full_url, data=data, params=params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
def _send_to_scicat(
self,
*,
cmd: str,
url: str,
data: model.BaseModel | None = None,
params: dict[str, str] | None = None,
) -> httpx.Response:
if self._token is not None:
token = self._token.get_str()
headers = {"Authorization": f"Bearer {token}"}
else:
token = ""
headers = {}
if data is not None:
headers["Content-Type"] = "application/json"
serialized_data = data.model_dump_json(exclude_none=True)
else:
serialized_data = None
try:
return httpx.request(
method=cmd,
url=url,
content=serialized_data,
params=params,
headers=headers,
timeout=self._timeout.seconds,
)
except Exception as exc:
# Remove concrete request function call from backtrace to hide the token.
# Also modify the error message to strip out the token.
# It shows up, e.g. in urllib3.exceptions.NewConnectionError.
# This turns the exception args into strings.
# But we have little use of more structured errors, so that should be fine.
> raise type(exc)(
*tuple(_strip_token(arg, token) for arg in exc.args)
) from None
E httpx.ReadTimeout: The read operation timed out
.tox/ingestor/lib/python3.12/site-packages/scitacean/client.py:1193: ReadTimeout
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 18, 23, 15, 40, 56767, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 18, 23, 15, 40, 56767, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()).tzinfo
E + and datetime.timedelta(days=1) = timedelta(hours=24)
tests/ingestor/ingestor_test.py:59: AssertionError
instrument = 'estia', 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(2026, 1, 16, 8, 4, 29, 500000, tzinfo=tzutc()) > (datetime.datetime(2026, 1, 18, 0, 42, 36, 921800, tzinfo=tzutc()) - datetime.timedelta(days=1))
E + where datetime.datetime(2026, 1, 18, 0, 42, 36, 921800, tzinfo=tzutc()) =
E + where
E + and tzutc() = datetime.datetime(2026, 1, 16, 8, 4, 29, 500000, 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
None
None
None
None
None
None
None
None
None
None