SCIM2 server fixture for Pytest
Project description
pytest-scim2-server
SCIM2 server fixture for Pytest
Installation
pip install pytest-scim2-server
Usage
pytest-scim2-server creates a scim2_server fixture that runs an instance of scim2-server on a random port, in a dedicated thread.
import requests
def test_scim_foobar(scim2_server):
res = request.get(f"http://localhost:{scim2_server.port}")
...
Note that you can use scim2-client to interact with the SCIM server.
import pytest
from httpx import Client
from scim2_client.engines.httpx import SyncSCIMClient
@pytest.fixture(scope="session")
def scim_client(scim2_server):
http_client = Client(base_url=f"http://localhost:{scim2_server.port}")
scim_client = SyncSCIMClient(http_client)
scim_client.discover()
return scim_client
def test_scim2_server(scim_client):
User = scim_client.get_resource_model("User")
user = User(user_name="bjensen@example.com")
response = scim_client.create(user)
users = scim_client.query(User)
assert users.resources[0].id == response.id
Project details
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 pytest_scim2_server-0.1.5.tar.gz.
File metadata
- Download URL: pytest_scim2_server-0.1.5.tar.gz
- Upload date:
- Size: 44.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e63b2356dc62485ddcbbdbac783126c10e393ea2406667f0ece5086640a2ea04
|
|
| MD5 |
c25c140481959db384fadc5b9d4e65a7
|
|
| BLAKE2b-256 |
4be270933ba624c8aab0fd076d5ad35f07d65eed3eb7323fb0f62f792deab06a
|
Provenance
The following attestation bundles were made for pytest_scim2_server-0.1.5.tar.gz:
Publisher:
release.yml on pytest-dev/pytest-scim2-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_scim2_server-0.1.5.tar.gz -
Subject digest:
e63b2356dc62485ddcbbdbac783126c10e393ea2406667f0ece5086640a2ea04 - Sigstore transparency entry: 212967956
- Sigstore integration time:
-
Permalink:
pytest-dev/pytest-scim2-server@16b565dbe84b1a4c31efc2c8c6e32d4781a25958 -
Branch / Tag:
refs/tags/0.1.5 - Owner: https://github.com/pytest-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b565dbe84b1a4c31efc2c8c6e32d4781a25958 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_scim2_server-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pytest_scim2_server-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7be577d083bf2c84f7c0114da4ec2ebbcc26442ec03b7f6ea4f2d49ea0a4eb58
|
|
| MD5 |
247b7b459d19258bfddf603b9e22c551
|
|
| BLAKE2b-256 |
17961def3d577fe0238678085295532397e1f74d8a490ea28e35ffc511cdd986
|
Provenance
The following attestation bundles were made for pytest_scim2_server-0.1.5-py3-none-any.whl:
Publisher:
release.yml on pytest-dev/pytest-scim2-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_scim2_server-0.1.5-py3-none-any.whl -
Subject digest:
7be577d083bf2c84f7c0114da4ec2ebbcc26442ec03b7f6ea4f2d49ea0a4eb58 - Sigstore transparency entry: 212967963
- Sigstore integration time:
-
Permalink:
pytest-dev/pytest-scim2-server@16b565dbe84b1a4c31efc2c8c6e32d4781a25958 -
Branch / Tag:
refs/tags/0.1.5 - Owner: https://github.com/pytest-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16b565dbe84b1a4c31efc2c8c6e32d4781a25958 -
Trigger Event:
push
-
Statement type: