@@ -45,7 +45,7 @@ def test_video_serializer_urls_with_aws_pipeline(self):
4545 )
4646
4747 @override_settings (
48- MEDIA_URL = "https://abc.cloudfront.net /" ,
48+ MEDIA_URL = "https://abc.svc.edge.scw.cloud /" ,
4949 )
5050 def test_video_serializer_urls_with_peertube_pipeline (self ):
5151 """The VideoBaseSerializer should return the right URLs."""
@@ -63,20 +63,20 @@ def test_video_serializer_urls_with_peertube_pipeline(self):
6363 serializer = VideoBaseSerializer (video )
6464
6565 self .assertEqual (
66- f"https://abc.cloudfront.net /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
66+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
6767 serializer .data ["urls" ]["thumbnails" ][1080 ],
6868 )
6969 self .assertEqual (
70- f"https://abc.cloudfront.net /vod/{ video .pk } /video/1640995200/master.m3u8?"
70+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /video/1640995200/master.m3u8?"
7171 "v=25301066da0654a2967176ea47c26f6735b2cfcbd206f49fe1379f5103bb7b1f" ,
7272 serializer .data ["urls" ]["manifests" ]["hls" ],
7373 )
7474 self .assertEqual (
75- f"https://abc.cloudfront.net /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
75+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
7676 serializer .data ["urls" ]["previews" ],
7777 )
7878 self .assertTrue (
79- f"https://abc.cloudfront.net /vod/{ video .pk } /"
79+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /"
8080 "video/1640995200/1640995200-1080-fragmented.mp4"
8181 in serializer .data ["urls" ]["mp4" ][1080 ]
8282 )
@@ -117,7 +117,7 @@ def test_video_serializer_urls_with_no_pipeline(self):
117117 )
118118
119119 @override_settings (
120- MEDIA_URL = "https://abc.cloudfront.net /" ,
120+ MEDIA_URL = "https://abc.svc.edge.scw.cloud /" ,
121121 )
122122 def test_video_serializer_urls_with_no_pipeline_recovered_to_peertube (self ):
123123 """The VideoBaseSerializer should return the right URLs with Peertube pipeline."""
@@ -129,29 +129,32 @@ def test_video_serializer_urls_with_no_pipeline_recovered_to_peertube(self):
129129 uploaded_on = date ,
130130 )
131131
132- with mock .patch (
133- "marsha.core.serializers.video.capture_message"
134- ) as sentry_capture_message , mock .patch (
135- "marsha.core.serializers.video.video_storage"
136- ) as mock_video_storage :
132+ with (
133+ mock .patch (
134+ "marsha.core.serializers.video.capture_message"
135+ ) as sentry_capture_message ,
136+ mock .patch (
137+ "marsha.core.serializers.video.video_storage"
138+ ) as mock_video_storage ,
139+ ):
137140 mock_video_storage .url = storage_class .video_storage .url
138141 mock_video_storage .exists .return_value = True
139142
140143 serializer = VideoBaseSerializer (video )
141144 self .assertEqual (
142- f"https://abc.cloudfront.net /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
145+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
143146 serializer .data ["urls" ]["thumbnails" ][1080 ],
144147 )
145148 self .assertEqual (
146- f"https://abc.cloudfront.net /vod/{ video .pk } /video/1640995200/master.m3u8" ,
149+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /video/1640995200/master.m3u8" ,
147150 serializer .data ["urls" ]["manifests" ]["hls" ],
148151 )
149152 self .assertEqual (
150- f"https://abc.cloudfront.net /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
153+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /video/1640995200/thumbnail.jpg" ,
151154 serializer .data ["urls" ]["previews" ],
152155 )
153156 self .assertTrue (
154- f"https://abc.cloudfront.net /vod/{ video .pk } /"
157+ f"https://abc.svc.edge.scw.cloud /vod/{ video .pk } /"
155158 "video/1640995200/1640995200-1080-fragmented.mp4"
156159 in serializer .data ["urls" ]["mp4" ][1080 ]
157160 )
0 commit comments