Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Capitalize constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar authored May 18, 2023
1 parent b8412d0 commit 71e1353
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/rest/client/test_read_marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

from tests import unittest

one_hour_ms = 3600000
one_day_ms = one_hour_ms * 24
ONE_HOUR_MS = 3600000
ONE_DAY_MS = ONE_HOUR_MS * 24


class ReadMarkerTestCase(unittest.HomeserverTestCase):
Expand All @@ -43,8 +43,8 @@ def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer:
# @override_config
retention_config = {
"enabled": True,
"allowed_lifetime_min": one_day_ms,
"allowed_lifetime_max": one_day_ms * 3,
"allowed_lifetime_min": ONE_DAY_MS,
"allowed_lifetime_max": ONE_DAY_MS * 3,
}
retention_config.update(config.get("retention", {}))
config["retention"] = retention_config
Expand Down Expand Up @@ -103,7 +103,7 @@ def test_send_read_marker_missing_previous_event(self) -> None:
self.helper.send_state(
room_id=room_id,
event_type=EventTypes.Retention,
body={"max_lifetime": one_day_ms},
body={"max_lifetime": ONE_DAY_MS},
tok=self.owner_tok,
)

Expand All @@ -126,7 +126,7 @@ def send_message() -> str:
# Send a second message (retention will not remove the latest event ever)
send_message()
# And then advance so retention rules remove the first event (where the marker is)
self.reactor.advance(one_day_ms * 2 / 1000)
self.reactor.advance(ONE_DAY_MS * 2 / 1000)

event = self.get_success(self.store.get_event(event_id_1, allow_none=True))
assert event is None
Expand Down

0 comments on commit 71e1353

Please sign in to comment.