import os
import sys

def fix():
    p = os.path.join(os.path.dirname(__file__), '../../src/')
    if p not in sys.path:
        sys.path.insert(0, p)

if "__main__" == __name__:
    fix()

import os
import sys

try:
    from unittest import mock
except ImportError:
    import mock


def fix():
    p = os.path.join(os.path.dirname(__file__), '../../src/')
    if p not in sys.path:
        sys.path.insert(0, p)


if "__main__" == __name__:
    fix()

Make 'mock' mocking library available for test cases stored under 'tests/adapter'
Make 'mock' mocking library available for test cases stored under 'tests/adapter'

  import os
  import sys
+ 
+ try:
+     from unittest import mock
+ except ImportError:
+     import mock
+ 
  
  def fix():
      p = os.path.join(os.path.dirname(__file__), '../../src/')
      if p not in sys.path:
          sys.path.insert(0, p)
  
+ 
  if "__main__" == __name__:
      fix()
  
Make 'mock' mocking library available for test cases stored under 'tests/adapter'
## Code Before:
import os
import sys

def fix():
    p = os.path.join(os.path.dirname(__file__), '../../src/')
    if p not in sys.path:
        sys.path.insert(0, p)

if "__main__" == __name__:
    fix()

## Instruction:
Make 'mock' mocking library available for test cases stored under 'tests/adapter'
## Code After:
import os
import sys

try:
    from unittest import mock
except ImportError:
    import mock


def fix():
    p = os.path.join(os.path.dirname(__file__), '../../src/')
    if p not in sys.path:
        sys.path.insert(0, p)


if "__main__" == __name__:
    fix()
