#test_mapping.py
#
# Copyright 2014 BitVault.

from __future__ import print_function

import json
import pytest


from patchboard.exception import PatchboardError
from patchboard.tests.fixtures import mock_pb, mock_api
pytest.mark.usefixtures(mock_pb, mock_api)


def test_generate_url(mock_api):
    with open(u"patchboard/tests/data/api_mappings_urls.json", u"r") as file:
        ruby_urls = json.load(file)

    python_urls = {}
    for key, mapping in mock_api.mappings.iteritems():
        try:
            #print(len(mapping.generate_url()))
            python_urls[key] = mapping.generate_url()
        except PatchboardError as e:
            python_urls[key] = "Exception: '{0}'".format(e)

    assert ruby_urls == python_urls

@@ -194,16 +194,17 @@
  import 
+(
 mock_pb,
@@ -204,24 +204,86 @@
 ock_pb, 
-mock_api
+net_pb, mock_api, net_api,%0A                                       api)
 %0Apytest.
@@ -308,21 +308,43 @@
 ock_pb, 
-mock_
+net_pb, mock_api, net_api, 
 api)%0A%0A%0Ad
@@ -364,21 +364,16 @@
 ate_url(
-mock_
 api):%0A  
@@ -530,21 +530,16 @@
 ping in 
-mock_
 api.mapp

Update test_mapping.py