Ejemplo n.º 1
0
            "price": {
                "currency": "EUR",
                "amount": 3
            },
            "dropoff_to_arrival_walking_time": 164,
            "distance": 16512
        }
    ]

"""

regex = re.compile(r'\\(?![/u"])')
fixed = regex.sub(r"\\\\", fake_response)

mock_get = mock.MagicMock(
    return_value=utils_test.MockResponse(json.loads(fixed), 200, '{}'))

DUMMY_BLABLALINES_FEED_PUBLISHER = {
    'id': '42',
    'name': '42',
    'license': 'I dunno',
    'url': 'http://w.tf'
}


# A hack class
class DummyInstance:
    name = ''


def get_ridesharing_service_test():
Ejemplo n.º 2
0
              "availableSeats": 4
            }
          }
        }
      ]
    }
  ],
  "url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResults%26networkId%3D33%26from%3D48.109377%252C-1.682103%26to%3D48.020335%252C-1.743929%26multimodal%3Dfalse%26departureDate%3D2017-12-25T08%253A00%253A00%252B01%253A00"
}

"""

regex = re.compile(r'\\(?![/u"])')
fixed = regex.sub(r"\\\\", fake_response)

mock_get = mock.MagicMock(return_value=utils_test.MockResponse(json.loads(fixed), 200, '{}'))

DUMMY_INSTANT_SYSTEM_FEED_PUBLISHER = {'id': '42', 'name': '42', 'license': 'I dunno', 'url': 'http://w.tf'}

# A hack class
class DummyInstance:
    name = ''
    walking_speed = 1.12
    greenlet_pool_for_ridesharing_services = True
    ridesharing_greenlet_pool_size = 42


def get_ridesharing_service_test():
    configs = [
        {
            "class": "jormungandr.scenarios.ridesharing.instant_system.InstantSystem",