Schul-Cloud Content API
Project description
This repository contains
a server to test scrapers against
tests to test the server
Installation
Using pip, you can install all dependencies like this:
pip install --user -r requirements.txt test-requrements.txt
Server
You can find the API definition. The server serves according to the API. It verifies the input and output for correctness.
To start the server, run
python3 -m schul_cloud_ressources_server_tests.app
Tests
You always test against the running server. Tests may delete everyting you can reach. If you test the running server, make sure to authenticate in a way that does not destroy the data you want to keep.
pytest --pyargs schul_cloud_ressources_server_tests.test --url=http://localhost:8080/v1/
http://localhost:8080/v1/ is the default url.
Steps for Implementation
If you want to implement your serverm you can follow the TDD steps to implement one test after the other.
pytest --pyargs schul_cloud_ressources_server_tests.test -m step1
pytest --pyargs schul_cloud_ressources_server_tests.test -m step2
pytest --pyargs schul_cloud_ressources_server_tests.test -m step3
...
step1 runs the first test
step2 runs the first and the second test
step3 runs the first, second and third test
…
You can run a single test with
pytest --pyargs schul_cloud_ressources_server_tests.test -m step3only
TODO
generate a docker container for the server
generate a docker container for the tests
document how to embed the tests and the server in
a crawler
travis build script of arbitrary language
create example crawler with tests
Project details
Release history Release notifications | RSS feed
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
Hashes for schul_cloud_ressources_server_tests-1.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7804aade2e429990d84286a8f78e0d6dc6e33d1bd6209811f98297b178f8afae |
|
MD5 | dd8e9f1a6c51c1430470db951f0cabe1 |
|
BLAKE2b-256 | 02fcce1b43f9bda562d1d4bddb6d95a49b399f7fb35b423fc86be88f864e3f09 |
Hashes for schul_cloud_ressources_server_tests-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15d0d8d330e511f6a82bcfe665a951cb8a4935c79d0bfe298d4be77725e9898 |
|
MD5 | a26e3ebd2b02e2ecf61b7e0d7773dfd6 |
|
BLAKE2b-256 | 660735c973ad889e5465e1be9deb1c39603be75fde6acf5e691714eac65cef9a |