1414from docx .image .constants import JPEG_MARKER_CODE , MIME_TYPE
1515from docx .image .helpers import BIG_ENDIAN , StreamReader
1616from docx .image .jpeg import (
17- _App0Marker , Exif , Jfif , _JfifMarkers , Jpeg , _Marker , _MarkerFactory ,
18- _MarkerFinder , _MarkerParser , _SofMarker
17+ _App0Marker , _App1Marker , Exif , Jfif , _JfifMarkers , Jpeg , _Marker ,
18+ _MarkerFactory , _MarkerFinder , _MarkerParser , _SofMarker
1919)
2020
2121from ..unitutil import class_mock , initializer_mock , instance_mock
@@ -154,6 +154,11 @@ def it_can_find_the_APP0_marker(self, app0_fixture):
154154 app0 = jfif_markers .app0
155155 assert app0 is app0_
156156
157+ def it_can_find_the_APP1_marker (self , app1_fixture ):
158+ jfif_markers , app1_ = app1_fixture
159+ app1 = jfif_markers .app1
160+ assert app1 is app1_
161+
157162 def it_raises_if_it_cant_find_the_APP0_marker (self , no_app0_fixture ):
158163 jfif_markers = no_app0_fixture
159164 with pytest .raises (KeyError ):
@@ -177,12 +182,24 @@ def app0_(self, request):
177182 request , _App0Marker , marker_code = JPEG_MARKER_CODE .APP0
178183 )
179184
185+ @pytest .fixture
186+ def app1_ (self , request ):
187+ return instance_mock (
188+ request , _App1Marker , marker_code = JPEG_MARKER_CODE .APP1
189+ )
190+
180191 @pytest .fixture
181192 def app0_fixture (self , soi_ , app0_ , eoi_ ):
182193 markers = (soi_ , app0_ , eoi_ )
183194 jfif_markers = _JfifMarkers (markers )
184195 return jfif_markers , app0_
185196
197+ @pytest .fixture
198+ def app1_fixture (self , soi_ , app1_ , eoi_ ):
199+ markers = (soi_ , app1_ , eoi_ )
200+ jfif_markers = _JfifMarkers (markers )
201+ return jfif_markers , app1_
202+
186203 @pytest .fixture
187204 def eoi_ (self , request ):
188205 return instance_mock (
0 commit comments