Skip to content

Commit

Permalink
feat: add fixtures for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martinalbert committed May 20, 2024
1 parent 79afdb6 commit 2972827
Show file tree
Hide file tree
Showing 48 changed files with 5,662 additions and 37 deletions.
126 changes: 126 additions & 0 deletions butter_cms/tests/fixtures/authors/test_author_all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"version": 1,
"interactions": [
{
"request": {
"method": "GET",
"uri": "https://api.buttercms.com/v2/authors/",
"body": null,
"headers": {
"User-Agent": [
"python-requests/2.31.0"
],
"Accept-Encoding": [
"gzip"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
],
"X-Butter-Client": [
"Python/2.1.1"
]
}
},
"response": {
"status": {
"code": 200,
"message": "OK"
},
"headers": {
"Connection": [
"keep-alive"
],
"Via": [
"1.1 vegur, 1.1 varnish, 1.1 varnish"
],
"X-Cache-Hits": [
"0, 0"
],
"Referrer-Policy": [
"same-origin"
],
"Allow": [
"GET, HEAD, OPTIONS"
],
"X-Timer": [
"S1716209390.373289,VS0,VE1"
],
"Access-Control-Allow-Origin": [
"*"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"gunicorn/19.9.0"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 20 May 2024 12:49:50 GMT"
],
"X-Frame-Options": [
"DENY"
],
"Age": [
"253"
],
"X-Served-By": [
"cache-iad-kiad7000126-IAD, cache-vie6327-VIE"
],
"Vary": [
"Origin, Accept-Encoding"
],
"Accept-Ranges": [
"bytes"
],
"X-Cache": [
"MISS, HIT"
],
"content-length": [
"458"
]
},
"body": {
"string": "{\"data\":[{\"first_name\":\"SDK\",\"last_name\":\"Tests\",\"email\":\"[email protected]\",\"slug\":\"sdk-tests\",\"bio\":\"\",\"title\":\"\",\"linkedin_url\":\"\",\"facebook_url\":\"\",\"instagram_url\":\"\",\"pinterest_url\":\"\",\"twitter_handle\":\"\",\"profile_image\":\"\"},{\"first_name\":\"John\",\"last_name\":\"Doe\",\"email\":\"\",\"slug\":\"john-doe\",\"bio\":\"Bio of test user\",\"title\":\"Test\",\"linkedin_url\":\"\",\"facebook_url\":\"\",\"instagram_url\":\"\",\"pinterest_url\":\"\",\"twitter_handle\":\"\",\"profile_image\":\"\"}]}",
"object": {
"data": [
{
"first_name": "SDK",
"last_name": "Tests",
"email": "[email protected]",
"slug": "sdk-tests",
"bio": "",
"title": "",
"linkedin_url": "",
"facebook_url": "",
"instagram_url": "",
"pinterest_url": "",
"twitter_handle": "",
"profile_image": ""
},
{
"first_name": "John",
"last_name": "Doe",
"email": "",
"slug": "john-doe",
"bio": "Bio of test user",
"title": "Test",
"linkedin_url": "",
"facebook_url": "",
"instagram_url": "",
"pinterest_url": "",
"twitter_handle": "",
"profile_image": ""
}
]
}
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"version": 1,
"interactions": [
{
"request": {
"method": "GET",
"uri": "https://api.buttercms.com/v2/authors/",
"body": null,
"headers": {
"User-Agent": [
"python-requests/2.31.0"
],
"Accept-Encoding": [
"gzip"
],
"Accept": [
"*/*"
],
"Connection": [
"keep-alive"
],
"X-Butter-Client": [
"Python/2.1.1"
]
}
},
"response": {
"status": {
"code": 401,
"message": "Unauthorized"
},
"headers": {
"Connection": [
"keep-alive"
],
"Via": [
"1.1 vegur, 1.1 varnish, 1.1 varnish"
],
"X-Cache-Hits": [
"0, 0"
],
"Referrer-Policy": [
"same-origin"
],
"Allow": [
"GET, HEAD, OPTIONS"
],
"X-Timer": [
"S1716209390.475255,VS0,VE130"
],
"Access-Control-Allow-Origin": [
"*"
],
"Www-Authenticate": [
"Token"
],
"X-Content-Type-Options": [
"nosniff"
],
"Server": [
"gunicorn/19.9.0"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 20 May 2024 12:49:50 GMT"
],
"X-Frame-Options": [
"DENY"
],
"X-Served-By": [
"cache-iad-kjyo7100176-IAD, cache-vie6370-VIE"
],
"Vary": [
"Origin"
],
"Accept-Ranges": [
"bytes"
],
"X-Cache": [
"MISS, MISS"
],
"Content-Length": [
"27"
]
},
"body": {
"string": "{\"detail\":\"Invalid token.\"}",
"object": {
"detail": "Invalid token."
}
}
}
}
]
}
Loading

0 comments on commit 2972827

Please sign in to comment.