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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mockquerpy-0.1.0.tar.gz.
File metadata
- Download URL: mockquerpy-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4574ea83a8bd8afade2678abfcf63ae73178cb399675f3e189cbdc335e7c303b
|
|
| MD5 |
7ee037f0cc543f4ec103e1ed618e4227
|
|
| BLAKE2b-256 |
af12232e518fa6d9b6c233877e58aef679c3dd9a5597aa3dfa68a052e062b460
|
File details
Details for the file mockquerpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mockquerpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ecb28a5eef5b95a3145468b151ffcb4ad7332e437435df62e5fa6ca8b36af64
|
|
| MD5 |
d1f46295e4588a1f35c8a184bf86b8f3
|
|
| BLAKE2b-256 |
43d00daf3a47b4b15ce30839173b5ce1421427445c3b1d239707c77daf65c4d8
|