A google bigquery client library mocker
Project description
MockQuerPy
This project implements a mocking library for quick and easy testing of google bigquery based python projects
Getting started
Instructions on getting a local developement copy on your machine
Using the Lib in your project
Basic use:
$ pip install mockquerpy
- Use either the context manager or decorator in your tests:
from mockquerpy import MockQuerPy, mockquerpy_wrap
with MockQuerPy(TEST_DATA) as bigquery:
print('bigquery inside here is a mockobject')
@mockquerpy_wrap
def test_my_bq_implementation(bigquery):
print('bigquery inside here is a mockobject')
MockQuerPy.set_test_data(MY_TEST_DATA)
See the project documentation for more // TODO
Developing the library
Prereq
- Python 3.7 or higher
Instructions
Developing the library:
- Set up a python virtualenv
$ virtualenv venv && source venv/bin/activate
- Install the dependencies
$ pip install -r requirements.txt
Testing
Project is being tested using the pytest framework. This is also added to the CI pipeline.
$ pytest .
Deploying
Deployment is and should be handled by the CD pipeline to the project, but can be done manually:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MockQuerPy-0.0.1.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for MockQuerPy-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f962f6f9b9e71a4b8a4983631444de7c3d6b17458bbc354c684bb8dee9f2ea |
|
MD5 | ead7f72fe9c53ceec2b4ab856651da87 |
|
BLAKE2b-256 | f8246a38e9677387766410d3271fdac30f94184b3bc23353e1846904ccf00593 |