VWS-Python-Mock

Mocking calls made to Vuforia with Python requests

pip3 install vws-python-mock

This requires Python 3.12+.

Using the mock redirects requests to Vuforia made with requests to an in-memory implementation.

import requests
from mock_vws import MockVWS
from mock_vws.database import VuforiaDatabase

with MockVWS() as mock:
    database = VuforiaDatabase()
    mock.add_database(database=database)
    # This will use the Vuforia mock.
    requests.get('https://vws.vuforia.com/summary')

By default, an exception will be raised if any requests to unmocked addresses are made.

See API Reference for details of what can be changed and how.

Using Docker to mock calls to Vuforia from any language

It is possible run a Mock VWS instance using Docker containers.

This allows you to run tests against a mock VWS instance regardless of the language or tooling you are using.

See Running a server with Docker for how to do this.

Reference