def _reset_output_streams(self):
        """
        Reset / clear stdout and stderr stream.
        """

        self.stdout.seek(0)
        self.stdout.truncate()
        self.stderr.seek(0)
        self.stderr.truncate()

        # Verify it has been reset correctly
        self.assertEqual(self.stdout.getvalue(), "")
        self.assertEqual(self.stderr.getvalue(), "")

        Reset / clear stdout and stderr stream.
        
st2client/tests/base.py