@@ -153,16 +153,18 @@ def test_integration_unstruct_event_base64_error(self):
153153 self .assertEquals ("walrus$tms in dict is not a tms" , str (e ))
154154
155155 def test_integration_standard_nv_pairs (self ):
156- t = tracker .Tracker ("localhost" , "cf" , app_id = "angry-birds-android" )
156+ t = tracker .Tracker ("localhost" , "cf" , app_id = "angry-birds-android" , context_vendor = "com.example" )
157157 t .set_platform ("mob" )
158158 t .set_user_id ("user12345" )
159159 t .set_screen_resolution (100 , 200 )
160160 t .set_color_depth (24 )
161161 t .set_timezone ("Europe London" )
162162 t .set_lang ("en" )
163163 with HTTMock (pass_response_content ):
164- t .track_page_view ("localhost" , "local host" , None )
165- expected_fields = {"tna" : "cf" , "evn" : "com.snowplowanalytics" , "res" : "100x200" , "lang" : "en" , "aid" : "angry-birds-android" , "cd" : "24" , "tz" : "Europe+London" , "p" : "mob" , "tv" : "py-" + _version .__version__ }
164+ t .track_page_view ("localhost" , "local host" , None , {'user' : {'user_type' : 'tester' }})
165+ expected_fields = {"tna" : "cf" , "evn" : "com.snowplowanalytics" , "res" : "100x200" ,
166+ "lang" : "en" , "aid" : "angry-birds-android" , "cd" : "24" , "tz" : "Europe+London" ,
167+ "p" : "mob" , "tv" : "py-" + _version .__version__ , "cv" : "com.example" }
166168 for key in expected_fields :
167169 self .assertEquals (from_querystring (key , querystrings [- 1 ]), expected_fields [key ])
168170
0 commit comments