def test_get_last_use_message_uses_most_recent_statistics(): template_statistics = [ { 'updated_at': '2000-01-01T12:00:00.000000+00:00' }, { 'updated_at': '2000-01-01T09:00:00.000000+00:00' }, ] assert get_last_use_message('My Template', template_statistics) == 'My Template was last used 3 hours ago'
def test_get_last_use_message_returns_no_template_message(): assert get_last_use_message('My Template', []) == 'My Template has never been used'