From 67ee8bdb5087144ceda7eaa40a3676a36e2ae29c Mon Sep 17 00:00:00 2001 From: Daniel Vitiello Date: Wed, 15 Feb 2017 16:32:29 -0600 Subject: [PATCH] Updated regex for Intercom APP_ID and tests for Intercom --- analytical/templatetags/intercom.py | 2 +- analytical/tests/test_tag_intercom.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/analytical/templatetags/intercom.py b/analytical/templatetags/intercom.py index b9e7dd7..66aeffa 100644 --- a/analytical/templatetags/intercom.py +++ b/analytical/templatetags/intercom.py @@ -12,7 +12,7 @@ from django.template import Library, Node, TemplateSyntaxError from analytical.utils import disable_html, get_required_setting, \ is_internal_ip, get_user_from_context, get_identity -APP_ID_RE = re.compile(r'[\da-f]+$') +APP_ID_RE = re.compile(r'[\da-z]+$') TRACKING_CODE = """ """, rendered_tag) @@ -55,7 +55,7 @@ class IntercomTagTestCase(TagTestCase): first_name='Firstname', last_name='Lastname', email="test@example.com", date_joined=now)})) self.assertTrue( - """window.intercomSettings = {"app_id": "1234567890abcdef0123456789", "created_at": 1397074500, "email": "test@example.com", "name": "Firstname Lastname"};"""\ + """window.intercomSettings = {"app_id": "abc123xyz", "created_at": 1397074500, "email": "test@example.com", "name": "Firstname Lastname"};"""\ in r )