Skip to content

Commit

Permalink
Factorize common tests (#10)
Browse files Browse the repository at this point in the history
* Update prettier repository

* Factorize common tests
  • Loading branch information
tetienne authored Dec 30, 2020
1 parent 97994d7 commit 9a81d6e
Show file tree
Hide file tree
Showing 6 changed files with 578 additions and 739 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ desktop.ini

# Virtual env
.venv

node_modules
package-lock.json
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
language: system
types: [text]
stages: [commit, push, manual]
- repo: https://github.com/prettier/prettier
rev: 2.1.2
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.1
hooks:
- id: prettier
14 changes: 12 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@pytest.fixture
def api() -> SynologyDSM:
"""Return a mock DSM API."""
"""Return a mock DSM 6 API."""
return SynologyDSMMock(
VALID_HOST,
VALID_PORT,
Expand All @@ -24,8 +24,18 @@ def api() -> SynologyDSM:
)


@pytest.fixture(
params=[5, 6],
ids=["DSM 5", "DSM 6"],
)
def dsm(request, api) -> SynologyDSM:
"""Return a mock DSM 6 API."""
api.dsm_version = request.param
return api


@pytest.fixture
def dsm(api) -> SynologyDSM:
def dsm_6(api) -> SynologyDSM:
"""Alias for api fixture."""
return api

Expand Down
Loading

0 comments on commit 9a81d6e

Please sign in to comment.