@@ -59,8 +59,8 @@ def test_same_boundary_inner_outer(self):
5959 inner = msg .get_payload (0 )
6060 self .assertTrue (hasattr (inner , 'defects' ))
6161 self .assertEqual (len (self .get_defects (inner )), 1 )
62- self .assertTrue ( isinstance (self .get_defects (inner )[0 ],
63- errors .StartBoundaryNotFoundDefect ) )
62+ self .assertIsInstance (self .get_defects (inner )[0 ],
63+ errors .StartBoundaryNotFoundDefect )
6464
6565 def test_multipart_no_boundary (self ):
6666 source = textwrap .dedent ("""\
@@ -84,12 +84,12 @@ def test_multipart_no_boundary(self):
8484 with self ._raise_point (errors .NoBoundaryInMultipartDefect ):
8585 msg = self ._str_msg (source )
8686 if self .raise_expected : return
87- self .assertTrue ( isinstance ( msg .get_payload (), str ) )
87+ self .assertIsInstance ( msg .get_payload (), str )
8888 self .assertEqual (len (self .get_defects (msg )), 2 )
89- self .assertTrue ( isinstance (self .get_defects (msg )[0 ],
90- errors .NoBoundaryInMultipartDefect ) )
91- self .assertTrue ( isinstance (self .get_defects (msg )[1 ],
92- errors .MultipartInvariantViolationDefect ) )
89+ self .assertIsInstance (self .get_defects (msg )[0 ],
90+ errors .NoBoundaryInMultipartDefect )
91+ self .assertIsInstance (self .get_defects (msg )[1 ],
92+ errors .MultipartInvariantViolationDefect )
9393
9494 multipart_msg = textwrap .dedent ("""\
9595 Date: Wed, 14 Nov 2007 12:56:23 GMT
@@ -153,10 +153,10 @@ def test_lying_multipart(self):
153153 if self .raise_expected : return
154154 self .assertTrue (hasattr (msg , 'defects' ))
155155 self .assertEqual (len (self .get_defects (msg )), 2 )
156- self .assertTrue ( isinstance (self .get_defects (msg )[0 ],
157- errors .NoBoundaryInMultipartDefect ) )
158- self .assertTrue ( isinstance (self .get_defects (msg )[1 ],
159- errors .MultipartInvariantViolationDefect ) )
156+ self .assertIsInstance (self .get_defects (msg )[0 ],
157+ errors .NoBoundaryInMultipartDefect )
158+ self .assertIsInstance (self .get_defects (msg )[1 ],
159+ errors .MultipartInvariantViolationDefect )
160160
161161 def test_missing_start_boundary (self ):
162162 source = textwrap .dedent ("""\
@@ -193,8 +193,8 @@ def test_missing_start_boundary(self):
193193 if self .raise_expected : return
194194 bad = outer .get_payload (1 ).get_payload (0 )
195195 self .assertEqual (len (self .get_defects (bad )), 1 )
196- self .assertTrue ( isinstance (self .get_defects (bad )[0 ],
197- errors .StartBoundaryNotFoundDefect ) )
196+ self .assertIsInstance (self .get_defects (bad )[0 ],
197+ errors .StartBoundaryNotFoundDefect )
198198
199199 def test_first_line_is_continuation_header (self ):
200200 with self ._raise_point (errors .FirstHeaderLineIsContinuationDefect ):
0 commit comments