Skip to content

Commit

Permalink
Merge pull request #134 from schireson/dc/fix-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCardin committed Dec 22, 2021
2 parents 93d4bb9 + e23bf50 commit f83a457
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Code which depends on external resources such a databases (postgres, redshift, e
to write automated tests for. Conventional wisdom might be to mock or stub out the actual database
calls and assert that the code works correctly before/after the calls.

However take the following, *simple* example:
However take the following, _simple_ example:

``` python
```python
def serialize(users):
return [
{
Expand All @@ -27,7 +27,7 @@ def view_function(session):
return serialize(users)
```

Sure, you can test `serialize`, but whether the actual **query** did the correct thing *truly*
Sure, you can test `serialize`, but whether the actual **query** did the correct thing _truly_
requires that you execute the query.

## The Pitch
Expand All @@ -49,7 +49,7 @@ documentation](https://docs.pytest.org/en/latest/fixture.html).

In the above example, your test file could look something like

``` python
```python
from pytest_mock_resources import create_postgres_fixture
from models import ModelBase

Expand Down Expand Up @@ -78,13 +78,13 @@ def test_view_function_user_with_purchases(pg):

- SQLite

``` python
```python
from pytest_mock_resources import create_sqlite_fixture
```

- Postgres

``` python
```python
from pytest_mock_resources import create_postgres_fixture
```

Expand All @@ -93,25 +93,25 @@ def test_view_function_user_with_purchases(pg):
**note** Uses postgres under the hood, but the fixture tries to support as much redshift
functionality as possible (including redshift's `COPY`/`UNLOAD` commands).

``` python
```python
from pytest_mock_resources import create_redshift_fixture
```

- Mongo

``` python
```python
from pytest_mock_resources import create_mongo_fixture
```

- Redis

``` python
```python
from pytest_mock_resources import create_redis_fixture
```

- MySQL

``` python
```python
from pytest_mock_resources import create_mysql_fixture
```

Expand All @@ -125,7 +125,7 @@ General features include:

## Installing

``` bash
```bash
# Basic fixture support
pip install "pytest-mock-resources"

Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ sphinx==3.3.0
sphinx_rtd_theme
sphinx_autodoc_typehints
sphinx-autobuild
docutils<0.18
mistune==0.8.4
.

0 comments on commit f83a457

Please sign in to comment.