swh.vulns.pytest_plugin module#
- class swh.vulns.pytest_plugin.VulnsServerProcess(config, *args, **kwargs)[source]#
Bases:
ForkServerProcess
- class swh.vulns.pytest_plugin.StatsdServer[source]#
Bases:
object- new_datagram#
Woken up every time a datagram is added to self.datagrams.
- swh.vulns.pytest_plugin.vulns_test_data_dir(tmp_path_factory) Path[source]#
Creates an empty directory where to write the fixtures’ data
- swh.vulns.pytest_plugin.vulns_grpc_server_implementation(request)[source]#
Returns
"naive". This can be overridden in tests that want to test the Rust implementation by returning"rust".
- swh.vulns.pytest_plugin.naive_vulns_server_data() List[DetectedVulnerability][source]#
Data served by the
swh.vulns.naive_server.NaiveVulnerabilityServicerspawned by thespawn_naive_grpc_server()fixture
- swh.vulns.pytest_plugin.vulns_grpc_server_config(vulns_test_db, vulns_statsd_server, vulns_grpc_server_implementation, request)[source]#
- swh.vulns.pytest_plugin.vulns_grpc_server_process(vulns_grpc_server_config, vulns_grpc_server_implementation, vulns_statsd_server, request)[source]#
- swh.vulns.pytest_plugin.vulns_grpc_server(vulns_grpc_server_started: VulnsServerProcess)[source]#
- swh.vulns.pytest_plugin.vulns_grpc_server_port(vulns_grpc_server_started: VulnsServerProcess) Iterator[int][source]#
Runs a gRPC server with the data configured via
naive_vulns_server_data(). Returns the port it is listening on