mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
test: date "later" saves and states a year ahead, not in 2099 (#5474)
This commit is contained in:
@@ -5548,7 +5548,7 @@ def test_a_streamed_state_is_the_one_cloud_sync_serves_for_its_slot(
|
||||
"Game.20261008-153825000000.state.auto",
|
||||
"mgba",
|
||||
core="mgba",
|
||||
updated_at=datetime(2099, 1, 1, tzinfo=timezone.utc),
|
||||
updated_at=datetime.now(timezone.utc) + timedelta(days=365),
|
||||
)
|
||||
|
||||
served = retroarch_sync.resolve_state_by_slot(
|
||||
@@ -5683,7 +5683,7 @@ def test_hydrate_pushes_a_newer_cloud_synced_state_of_the_booted_core(
|
||||
admin_user,
|
||||
"Game.state.auto",
|
||||
"bsnes",
|
||||
updated_at=datetime(2099, 1, 1, tzinfo=timezone.utc),
|
||||
updated_at=datetime.now(timezone.utc) + timedelta(days=365),
|
||||
)
|
||||
push = _hydrate_core(
|
||||
rom, admin_user, "retroarch:bsnes", states.StateCore("bsnes", False)
|
||||
|
||||
@@ -1734,12 +1734,12 @@ class TestNegotiateBaseline:
|
||||
assert upload.status_code == status.HTTP_200_OK
|
||||
|
||||
# The server moves on after the boundary the upload recorded.
|
||||
later = (datetime.now(timezone.utc) + timedelta(days=365)).replace(
|
||||
microsecond=0
|
||||
)
|
||||
db_save_handler.update_save(
|
||||
upload.json()["id"],
|
||||
{
|
||||
"content_hash": "server_new",
|
||||
"updated_at": datetime(2099, 1, 1, tzinfo=timezone.utc),
|
||||
},
|
||||
{"content_hash": "server_new", "updated_at": later},
|
||||
)
|
||||
|
||||
with mock.patch(
|
||||
@@ -1755,7 +1755,7 @@ class TestNegotiateBaseline:
|
||||
"file_name": "chain.sav",
|
||||
"slot": "autosave",
|
||||
"content_hash": "client_hash",
|
||||
"updated_at": "2099-01-01T00:00:00Z",
|
||||
"updated_at": later.isoformat(),
|
||||
"file_size_bytes": 100,
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user