def __call__(self, filename, *argv):
    # Special case which allows the exception handler to open files to
    # annotate tracebacks.
    if filename and filename.endswith('.py'):
      return self.__class__.file_open(filename, *argv)

    contents = self.filename_contents.get(
        filename, self.filename_contents.get(None))
    self.test_case.assertNotEquals(None, contents)
    return FileMock(contents)
Convert HttpResponseRedirect to HttpResponse if request is via ajax
dataset/ETHPy150Open google/fplutil/buildutil/android_test.py/FileSetMockFactory.__call__--crossover with--dataset/ETHPy150Open openstack/horizon/horizon/middleware.py/HorizonMiddleware.process_response