File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 55MANIFEST
66build /
77.eggs /
8- .coverage /
8+ .coverage
99.vscode /
1010env /
1111venv /
Original file line number Diff line number Diff line change 33import logging
44import numbers
55from datetime import datetime , timedelta
6- from uuid import uuid4
6+ from uuid import UUID , uuid4
77
8- import requests
98from dateutil .tz import tzutc
109from six import string_types
1110
2120 import Queue as queue
2221
2322
24- ID_TYPES = (numbers .Number , string_types )
23+ ID_TYPES = (numbers .Number , string_types , UUID )
2524__LONG_SCALE__ = float (0xFFFFFFFFFFFFFFF )
2625
2726
Original file line number Diff line number Diff line change 11import time
22import unittest
33from datetime import date , datetime
4+ from uuid import uuid4
45
56import mock
67import six
@@ -122,6 +123,16 @@ def test_basic_page(self):
122123 self .assertEqual (msg ["distinct_id" ], "distinct_id" )
123124 self .assertEqual (msg ["properties" ]["$current_url" ], "https://posthog.com/contact" )
124125
126+ def test_basic_page_distinct_uuid (self ):
127+ client = self .client
128+ distinct_id = uuid4 ()
129+ success , msg = client .page (distinct_id , url = "https://posthog.com/contact" )
130+ self .assertFalse (self .failed )
131+ client .flush ()
132+ self .assertTrue (success )
133+ self .assertEqual (msg ["distinct_id" ], str (distinct_id ))
134+ self .assertEqual (msg ["properties" ]["$current_url" ], "https://posthog.com/contact" )
135+
125136 def test_advanced_page (self ):
126137 client = self .client
127138 success , msg = client .page (
You can’t perform that action at this time.
0 commit comments