Spaces:
Sleeping
Sleeping
Download tests/test_models.py from Humanlearning/CyberSecurity_OWASP: direct link, hf CLI and curl.
- Browser
- Download file 498 Bytes
-
https://huggingface.co/spaces/Humanlearning/CyberSecurity_OWASP/resolve/main/tests/test_models.py
- Command line
-
hf download hf://spaces/Humanlearning/CyberSecurity_OWASP/tests/test_models.py
-
curl -L -o test_models.py https://huggingface.co/spaces/Humanlearning/CyberSecurity_OWASP/resolve/main/tests/test_models.py
498 Bytes
| from CyberSecurity_OWASP import ( | |
| CyberSecurityOWASPAction, | |
| CyberSecurityOWASPObservation, | |
| CyberSecurityOWASPState, | |
| ) | |
| def test_models_serialize(): | |
| action = CyberSecurityOWASPAction(tool_name="noop") | |
| assert action.model_dump()["tool_name"] == "noop" | |
| obs = CyberSecurityOWASPObservation(phase="discover", message="ok") | |
| assert obs.model_dump()["phase"] == "discover" | |
| state = CyberSecurityOWASPState(episode_id="e1", seed=1) | |
| assert state.model_dump()["seed"] == 1 | |