@@ -184,6 +184,19 @@ def test_web_url_failure_url(self):
184184 url = self .lp ._get_web_url (self .item , 'PAGE_TYPE' , failure_url = None )
185185 self .assertFalse (self .assertQueryString (url , 'failure_url' ))
186186
187+ def test_web_url_muid (self ):
188+ # Default
189+ url = self .lp ._get_web_url (self .item , 'PAGE_TYPE' )
190+ self .assertFalse (self .assertQueryString (url , 'muid' ))
191+
192+ # Given
193+ url = self .lp ._get_web_url (self .item , 'PAGE_TYPE' , muid = '0zA9-aZ09-0A9z' )
194+ self .assertQueryString (url , 'muid' , value = '0zA9-aZ09-0A9z' )
195+
196+ # Omitted
197+ url = self .lp ._get_web_url (self .item , 'PAGE_TYPE' , muid = None )
198+ self .assertFalse (self .assertQueryString (url , 'muid' ))
199+
187200 def test_get_add_url (self ):
188201 item = ItemDefinition (1 , 'EUR20' , 'http://example.net/t' , 'title' )
189202 url = self .lp .get_add_url (
@@ -195,6 +208,7 @@ def test_get_add_url(self):
195208 consumable = True ,
196209 return_url = 'http://return.url/foo?bar=buz&lorem=ipsum' ,
197210 failure_url = 'http://failure.url/FOO?BAR=BUZ&LOREM=IPSUM' ,
211+ muid = 'someone' ,
198212 something = 'else' ,
199213 BLUB = [u'u2' , b'b1' , b'b2' , u'u1' ],
200214 )
@@ -209,6 +223,7 @@ def test_get_add_url(self):
209223 self .assertQueryString (url , 'consumable' , value = '1' )
210224 self .assertQueryString (url , 'return_url' , value = 'http://return.url/foo?bar=buz&lorem=ipsum' )
211225 self .assertQueryString (url , 'failure_url' , value = 'http://failure.url/FOO?BAR=BUZ&LOREM=IPSUM' )
226+ self .assertQueryString (url , 'muid' , value = 'someone' )
212227 self .assertQueryString (url , 'something' , value = 'else' )
213228 self .assertQueryString (url , 'BLUB' , value = [b'b1' , 'b2' , u'u1' , 'u2' ])
214229
@@ -223,6 +238,7 @@ def test_get_buy_url(self):
223238 consumable = True ,
224239 return_url = 'http://return.url/foo?bar=buz&lorem=ipsum' ,
225240 failure_url = 'http://failure.url/FOO?BAR=BUZ&LOREM=IPSUM' ,
241+ muid = 'someone' ,
226242 something = 'else' ,
227243 BLUB = [u'u2' , b'b1' , b'b2' , u'u1' ],
228244 )
@@ -237,6 +253,7 @@ def test_get_buy_url(self):
237253 self .assertQueryString (url , 'consumable' , value = '1' )
238254 self .assertQueryString (url , 'return_url' , value = 'http://return.url/foo?bar=buz&lorem=ipsum' )
239255 self .assertQueryString (url , 'failure_url' , value = 'http://failure.url/FOO?BAR=BUZ&LOREM=IPSUM' )
256+ self .assertQueryString (url , 'muid' , value = 'someone' )
240257 self .assertQueryString (url , 'something' , value = 'else' )
241258 self .assertQueryString (url , 'BLUB' , value = [b'b1' , 'b2' , u'u1' , 'u2' ])
242259
@@ -248,6 +265,7 @@ def test_get_subscribe_url(self):
248265 dialog = False ,
249266 return_url = 'http://return.url/foo?bar=buz&lorem=ipsum' ,
250267 failure_url = 'http://failure.url/FOO?BAR=BUZ&LOREM=IPSUM' ,
268+ muid = 'someone' ,
251269 something = 'else' ,
252270 period = 12345 ,
253271 BLUB = [u'u2' , b'b1' , b'b2' , u'u1' ],
@@ -261,6 +279,7 @@ def test_get_subscribe_url(self):
261279 self .assertTrue (url .startswith ('https://web.laterpay.net/subscribe?' ))
262280 self .assertQueryString (url , 'return_url' , value = 'http://return.url/foo?bar=buz&lorem=ipsum' )
263281 self .assertQueryString (url , 'failure_url' , value = 'http://failure.url/FOO?BAR=BUZ&LOREM=IPSUM' )
282+ self .assertQueryString (url , 'muid' , value = 'someone' )
264283 self .assertQueryString (url , 'something' , value = 'else' )
265284 self .assertQueryString (url , 'period' , value = '12345' )
266285 self .assertQueryString (url , 'BLUB' , value = [b'b1' , 'b2' , u'u1' , 'u2' ])
0 commit comments