New paste Repaste Download
client = <FlaskClient <Flask 'status'>>
    def test_naive_timestamp_is_serialized_with_a_utc_offset(client):
        """THE REGRESSION. The stored value is naive-UTC; without the offset the browser reads it as
        local time. 13:40:13 UTC is 09:40:13 ET — the operator's actual click."""
        rows = [{"action": "perm_unlock_all",
                 "timestamp": datetime(2026, 8, 4, 13, 40, 13, 520000)}]
>       ts = _get(client, rows)[0]["timestamp"]
             ^^^^^^^^^^^^^^^^^^
tests/test_manual_actions_api_timestamp_tz.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
client = <FlaskClient <Flask 'status'>>
rows = [{'action': 'perm_unlock_all', 'timestamp': datetime.datetime(2026, 8, 4, 13, 40, 13, 520000)}]
    def _get(client, rows):
        """Drive the endpoint with `load_recent` stubbed — no Mongo, no broker."""
        with patch("rtrader.services.manual_action_log.load_recent", return_value=rows):
            resp = client.get("/api/tide-wave/manual-actions",
                              query_string={"date": "2026-08-04", "limit": 1})
>       assert resp.status_code == 200
E       assert 401 == 200
E        +  where 401 = <WrapperTestResponse streamed [401 UNAUTHORIZED]>.status_code
tests/test_manual_actions_api_timestamp_tz.py:49: AssertionError
Filename: None. Size: 1kb. View raw, , hex, or download this file.

This paste expires on 2026-08-11 23:30:07.809193+00:00. Pasted through deprecated-web.