@@ -128,51 +128,51 @@ def test_integration_struct_event(self):
128128 def test_integration_unstruct_event_non_base64 (self ):
129129 t = tracker .Tracker (default_emitter , default_subject , encode_base64 = False )
130130 with HTTMock (pass_response_content ):
131- t .track_unstruct_event ({"schema" : "com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }})
131+ t .track_unstruct_event ({"schema" : "iglu:// com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }})
132132 expected_fields = {"e" : "ue" }
133133 for key in expected_fields :
134134 self .assertEquals (from_querystring (key , querystrings [- 1 ]), expected_fields [key ])
135135 envelope_string = from_querystring ("ue_pr" , querystrings [- 1 ])
136136 envelope = json .loads (unquote_plus (envelope_string ))
137137 self .assertEquals (envelope , {
138- "schema" : "com.snowplowanalytics/unstruct_event/jsonschema/1-0-0" ,
139- "data" : {"schema" : "com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }}
138+ "schema" : "iglu:// com.snowplowanalytics/unstruct_event/jsonschema/1-0-0" ,
139+ "data" : {"schema" : "iglu:// com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }}
140140 })
141141
142142 def test_integration_unstruct_event_base64 (self ):
143143 t = tracker .Tracker (default_emitter , default_subject , encode_base64 = True )
144144 with HTTMock (pass_response_content ):
145- t .track_unstruct_event ({"schema" : "com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }})
145+ t .track_unstruct_event ({"schema" : "iglu:// com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }})
146146 expected_fields = {"e" : "ue" }
147147 for key in expected_fields :
148148 self .assertEquals (from_querystring (key , querystrings [- 1 ]), expected_fields [key ])
149149 envelope_string = from_querystring ("ue_px" , querystrings [- 1 ])
150150 envelope = json .loads ((base64 .urlsafe_b64decode (bytearray (envelope_string , "utf-8" ))).decode ("utf-8" ))
151151 self .assertEquals (envelope , {
152- "schema" : "com.snowplowanalytics/unstruct_event/jsonschema/1-0-0" ,
153- "data" : {"schema" : "com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }}
152+ "schema" : "iglu:// com.snowplowanalytics/unstruct_event/jsonschema/1-0-0" ,
153+ "data" : {"schema" : "iglu:// com.acme/viewed_product/jsonschema/2-0-2" , "data" : {"product_id" : "ASO01043" , "price$flt" : 49.95 , "walrus$tms" : 1000 }}
154154 })
155155
156156 def test_integration_context_non_base64 (self ):
157157 t = tracker .Tracker (default_emitter , default_subject , encode_base64 = False )
158158 with HTTMock (pass_response_content ):
159- t .track_page_view ("localhost" , "local host" , None , [{"schema" : "com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}])
159+ t .track_page_view ("localhost" , "local host" , None , [{"schema" : "iglu:// com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}])
160160 envelope_string = from_querystring ("co" , querystrings [- 1 ])
161161 envelope = json .loads (unquote_plus (envelope_string ))
162162 self .assertEquals (envelope , {
163- "schema" : "com.snowplowanalytics/contexts/jsonschema/1-0-0" ,
164- "data" :[{"schema" : "com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}]
163+ "schema" : "iglu:// com.snowplowanalytics/contexts/jsonschema/1-0-0" ,
164+ "data" :[{"schema" : "iglu:// com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}]
165165 })
166166
167167 def test_integration_context_base64 (self ):
168168 t = tracker .Tracker (default_emitter , default_subject , encode_base64 = True )
169169 with HTTMock (pass_response_content ):
170- t .track_page_view ("localhost" , "local host" , None , [{"schema" : "com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}])
170+ t .track_page_view ("localhost" , "local host" , None , [{"schema" : "iglu:// com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}])
171171 envelope_string = from_querystring ("cx" , querystrings [- 1 ])
172172 envelope = json .loads ((base64 .urlsafe_b64decode (bytearray (envelope_string , "utf-8" ))).decode ("utf-8" ))
173173 self .assertEquals (envelope , {
174- "schema" : "com.snowplowanalytics/contexts/jsonschema/1-0-0" ,
175- "data" :[{"schema" : "com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}]
174+ "schema" : "iglu:// com.snowplowanalytics/contexts/jsonschema/1-0-0" ,
175+ "data" :[{"schema" : "iglu:// com.example/user/jsonschema/2-0-3" , "data" : {"user_type" : "tester" }}]
176176 })
177177
178178 def test_integration_standard_nv_pairs (self ):
0 commit comments