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
Related projects
If you are working with SCIM and Python you might also want to have a look at:
Release files for pytest-scim2-server 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_scim2_server-0.1.6.tar.gz | 59.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_scim2_server-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.5 kB
Release files / pytest_scim2_server-0.1.6.tar.gz
| Download URL | pytest_scim2_server-0.1.6.tar.gz |
|---|---|
| Size | 59.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e2bbc4cf3c42d01b7d0d66f69f23fb7b211f87ce4234b0fb23714171c153cbc
|
|
BLAKE2b-256 checksum How to use checksums |
92df71522f0578785b133b14e767e71da6fb5790420702fe5f244109c88d0d3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2025.
Transparency logRelease files / pytest_scim2_server-0.1.6-py3-none-any.whl
| Download URL | pytest_scim2_server-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87565e690456ebfd3a04b17608de1ab08cb21656ec8fa83560574f78f00853c0
|
|
BLAKE2b-256 checksum How to use checksums |
1becac1c44a262ca03a6f60242c394441a08438f839e3a68c3befe85f403a2fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2025.
Transparency log