forked from svanoort/pyresttest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminiapp-test.yaml
33 lines (32 loc) · 1.07 KB
/
miniapp-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Test using included Django test app
# First install python-django
# Then launch the app in another terminal by doing
# cd testapp
# python manage.py testserver test_data.json
# Once launched, tests can be executed via:
# python resttest.py http://localhost:8000 miniapp-test.yaml
---
- config:
- testset: "Tests using test app"
- test: # create entity
- name: "Basic get"
- url: "/api/person/"
- test: # create entity
- name: "Get single person"
- url: "/api/person/1/"
- test: # create entity
- name: "Get single person"
- url: "/api/person/1/"
- method: 'DELETE'
- test: # create entity by PUT
- name: "Create/update person"
- url: "/api/person/1/"
- method: "PUT"
- body: '{"first_name": "Gaius","id": 1,"last_name": "Baltar","login": "gbaltar"}'
- headers: {'Content-Type': 'application/json'}
- test: # create entity by POST
- name: "Create person"
- url: "/api/person/"
- method: "POST"
- body: '{"first_name": "Willim","last_name": "Adama","login": "theadmiral"}'
- headers: {Content-Type: application/json}