"""Test dynamo utils.""" from src.utils import dynamo_utils def test_buffer_id(): """Test compress and decompress buffer_id.""" str_id = dynamo_utils.compress_buffer_id( 'trending_tracks', 123, 'InsightsProfile') assert str_id == 'trending_tracks:123:InsightsProfile' event_type, profile_id, profile_type = dynamo_utils.decompress_buffer_id(str_id) # noqa:E501 assert event_type == 'trending_tracks' assert profile_id == 123 assert profile_type == 'InsightsProfile'