diff --git a/IPython/nbconvert/preprocessors/tests/base.py b/IPython/nbconvert/preprocessors/tests/base.py
index 8c72e51..d5c1459 100644
--- a/IPython/nbconvert/preprocessors/tests/base.py
+++ b/IPython/nbconvert/preprocessors/tests/base.py
@@ -36,7 +36,7 @@ class PreprocessorTestsBase(TestsBase):
                    nbformat.new_output(output_type="stream", stream="stdout", output_text="d"),
                    nbformat.new_output(output_type="stream", stream="stderr", output_text="e"),
                    nbformat.new_output(output_type="stream", stream="stderr", output_text="f"),
-                   nbformat.new_output(output_type="png", output_png=b'Zw==')] #g
+                   nbformat.new_output(output_type="png", output_png='Zw==')] #g
         
         cells=[nbformat.new_code_cell(input="$ e $", prompt_number=1,outputs=outputs),
                nbformat.new_text_cell('markdown', source="$ e $")]
diff --git a/IPython/nbconvert/preprocessors/tests/test_extractoutput.py b/IPython/nbconvert/preprocessors/tests/test_extractoutput.py
index 4a13ebd..08bd1f2 100644
--- a/IPython/nbconvert/preprocessors/tests/test_extractoutput.py
+++ b/IPython/nbconvert/preprocessors/tests/test_extractoutput.py
@@ -46,12 +46,14 @@ class TestExtractOutput(PreprocessorTestsBase):
         nb, res = preprocessor(nb, res)
 
         # Check if text was extracted.
-        assert 'text_filename' in nb.worksheets[0].cells[0].outputs[1]
-        text_filename = nb.worksheets[0].cells[0].outputs[1]['text_filename']
+        output = nb.worksheets[0].cells[0].outputs[1]
+        assert 'text_filename' in output
+        text_filename = output['text_filename']
 
         # Check if png was extracted.
-        assert 'png_filename' in nb.worksheets[0].cells[0].outputs[6]
-        png_filename = nb.worksheets[0].cells[0].outputs[6]['png_filename']
+        output = nb.worksheets[0].cells[0].outputs[6]
+        assert 'png_filename' in output
+        png_filename = output['png_filename']
 
         # Verify text output
         assert text_filename in res['outputs']