mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Pushed the cache increment into the shared code that persists notifications.
Much simpler implementation, inc code removed from tasks and V1/V2 rest clients.
This commit is contained in:
@@ -2,7 +2,7 @@ import pytest
|
||||
from unittest.mock import Mock
|
||||
|
||||
from app.clients.redis.redis_client import RedisClient
|
||||
from app.clients.redis import cache_key
|
||||
from app.clients.redis import daily_limit_cache_key
|
||||
from freezegun import freeze_time
|
||||
|
||||
|
||||
@@ -78,4 +78,4 @@ def test_should_call_get_if_enabled(enabled_redis_client):
|
||||
|
||||
def test_should_build_cache_key_service_and_action(sample_service):
|
||||
with freeze_time("2016-01-01 12:00:00.000000"):
|
||||
assert cache_key(sample_service.id) == '{}-2016-01-01-count'.format(sample_service.id)
|
||||
assert daily_limit_cache_key(sample_service.id) == '{}-2016-01-01-count'.format(sample_service.id)
|
||||
|
||||
Reference in New Issue
Block a user