@@ -518,6 +518,7 @@ def test_json():
518
518
req = service .prepare_request ('POST' , url = '' , headers = {'X-opt-out' : True }, data = {'hello' : 'world' })
519
519
assert req .get ('data' ) == "{\" hello\" : \" world\" }"
520
520
521
+ # For v2.x this test expects to see trailing slashes, this should be changed in v3.x
521
522
def test_trailing_slash ():
522
523
service = AnyServiceV1 ('2018-11-20' , service_url = 'https://trailingSlash.com/' , authenticator = NoAuthAuthenticator ())
523
524
assert service .service_url == 'https://trailingSlash.com/'
@@ -527,7 +528,7 @@ def test_trailing_slash():
527
528
url = '/trailingSlashPath/' ,
528
529
headers = {'X-opt-out' : True },
529
530
data = {'hello' : 'world' })
530
- assert req .get ('url' ) == 'https://trailingSlash.com//trailingSlashPath'
531
+ assert req .get ('url' ) == 'https://trailingSlash.com//trailingSlashPath/ '
531
532
532
533
service = AnyServiceV1 ('2018-11-20' , service_url = 'https://trailingSlash.com/' , authenticator = NoAuthAuthenticator ())
533
534
assert service .service_url == 'https://trailingSlash.com/'
@@ -537,7 +538,7 @@ def test_trailing_slash():
537
538
url = '/' ,
538
539
headers = {'X-opt-out' : True },
539
540
data = {'hello' : 'world' })
540
- assert req .get ('url' ) == 'https://trailingSlash.com/'
541
+ assert req .get ('url' ) == 'https://trailingSlash.com// '
541
542
542
543
service .set_service_url (None )
543
544
assert service .service_url is None
@@ -550,7 +551,7 @@ def test_trailing_slash():
550
551
url = '/' ,
551
552
headers = {'X-opt-out' : True },
552
553
data = {'hello' : 'world' })
553
- assert req .get ('url' ) == '/'
554
+ assert req .get ('url' ) == '// '
554
555
555
556
def test_service_url_not_set ():
556
557
service = BaseService (service_url = '' , authenticator = NoAuthAuthenticator ())
0 commit comments