semvec/pypi-packages huggingface dataset:
fw-test-env 0.1.4
Flywheel integration test environment through a Pytest plugin.
License: MIT
Requires Python: >=3.7,<4.0
Keywords: Flywheel,Pytest,docker,fixture,integration,test,testing

# fw-test-env

`fw-test-env` provides a Flywheel integration test environment that can be used
easily as a Pytest plugin.

It uses docker to spin up

- MongoDB
- Flywheel Core

`fw` fixture exposes the following attributes:

- `fw.load` - Load test data
- `fw.dump` - Dump database
- `fw.reset` - Cleanup database
- `fw.db` - Pymongo database client
- `fw.client` - Get authenticated `CoreClient` instance (e.g. `fw.client.admin`)

When using the `fw` pytest plugin it will load sane defaults into the database.
For more details check the [default fixture yaml](fw_test_env/defaults.yml).

## Installation

Add as a `poetry` dev dependency to your project:

```bash
poetry add --dev fw-test-env
```

## Usage

```python
import pytest

pytest_plugins = "fw_test_env.pytest_plugin"


def test_core_client(fw):
    resp = fw.client.admin.get("/users/self")
    assert resp["_id"] == "admin@flywheel.test"


# skip creating any acquisition
@pytest.mark.fw_data({"acquisitions": []})
def test_with_custom_defaults(fw):
    resp = fw.client.admin.get("/acquisitions")
    assert len(resp) == 0


# specify the filepath relative to "test/data"
# current limitations: test file name needs to be a valid UUID
# and it should start with '0000' (four zero)
def test_with_files(fw):
    test_file = "00000000-0000-0000-0000-000000000000"
    fw.load({"files": [{"name": "test.txt", "uuid": test_file}]})
    acq_id = fw.dump()["acquisitions"][-1]["_id"]
    resp = fw.client.admin.get(f"/acquisitions/{str(acq_id)}/files/test.txt", raw=True)
    assert resp.content == b"foo bar\n"

```

For more examples see: [test_pytest_fixtures.py](tests/test_pytest_fixtures.py)

## Development

Install the project using `poetry` and enable `pre-commit`:

```bash
poetry install
pre-commit install
```

## License

[![MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
fordpass1 0.0.6
Python wrapper for the FordPass API for Ford vehicle information and control: start, stop, lock, unlock.
License: MIT



# fordpass-python

This is a basic Python wrapper around the FordPass APIs. The wrapper provides methods to return vehicle status as well as some basic commands, e.g. start/stop, lock/unlock.

It's more or less a straight port of @d4v3y0rk's NPM module [d4v3y0rk/ffpass](https://github.com/d4v3y0rk/ffpass-module) - props to him for his work figuring out the relevant API requests needed.

## Features

* Automatically auth & re-fetches tokens once expired
* Get status of the vehicle (this returns a ton of info about the car: lat/long, oil, battery, fuel, odometer, tire pressures, open windows and a bunch of other stuff that may/may not apply to your car, e.g. charge level, diesel filters.)
* Start the engine (if supported)
* Stop the engine (if supported)
* Lock the doors
* Unlock the doors

## Install
Install using pip:

```
pip install fordpass
```

## Demo

To test the libary there is a demo script `demo.py`.

```
demo.py USERNAME PASSWORD VIN
```

e.g.

```
demo.py test@test.com mypassword WX12345678901234
```

## Publishing new versions of this package

1. Bump the version number inside `setup.py`.
2. Build the package: `python setup.py sdist bdist_wheel`.
3. Upload to TestPyPi using `twine upload --repository-url https://test.pypi.org/legacy/ dist/*` and verify everything is as expected.
4. Upload to PyPi using `twine upload dist/*`.
5. All done!