Skip to content

Commit 4524362

Browse files
author
Inbal Tako
committed
SN-1938 Validate user id
1 parent ff2466f commit 4524362

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/api_manager_test.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from securenative.event_manager import EventManager
1111
from securenative.event_options_builder import EventOptionsBuilder
1212
from securenative.exceptions.securenative_invalid_options_exception import SecureNativeInvalidOptionsException
13+
from securenative.models.event_options import EventOptions
1314
from securenative.models.user_traits import UserTraits
1415
from securenative.models.verify_result import VerifyResult
1516

@@ -24,13 +25,11 @@ def setUp(self):
2425
"user-agent": "Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405"
2526
}).build()
2627

27-
self.event_options = EventOptionsBuilder(EventTypes.LOG_IN). \
28-
with_user_id("USER_ID"). \
29-
with_user_traits(UserTraits("USER_NAME", "USER_EMAIL", "+12012673412")). \
30-
with_context(self.context). \
31-
with_properties({"prop1": "CUSTOM_PARAM_VALUE",
32-
"prop2": True,
33-
"prop3": 3}).build()
28+
self.event_options = EventOptions(EventTypes.LOG_IN, "USER_ID",
29+
UserTraits("USER_NAME", "USER_EMAIL", "+12012673412"), context=self.context,
30+
properties={"prop1": "CUSTOM_PARAM_VALUE",
31+
"prop2": True,
32+
"prop3": 3})
3433

3534
@responses.activate
3635
def test_track_event(self):

0 commit comments

Comments
 (0)