Skip to content

Commit

Permalink
add fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushal committed Aug 22, 2014
1 parent 06dc231 commit a07de3b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixtures/GitHub_emojis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [], "recorded_with": "betamax/0.4.0"}
1 change: 1 addition & 0 deletions test/fixtures/global_preserve_exact_body_bytes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"base64_string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["python-requests/2.3.0 CPython/2.7.5 Darwin/13.2.0"]}, "method": "GET", "uri": "https://httpbin.org/get"}, "response": {"body": {"base64_string": "ewogICJhcmdzIjoge30sIAogICJoZWFkZXJzIjogewogICAgIkFjY2VwdCI6ICIqLyoiLCAKICAgICJBY2NlcHQtRW5jb2RpbmciOiAiZ3ppcCwgZGVmbGF0ZSIsIAogICAgIkNvbm5lY3Rpb24iOiAiY2xvc2UiLCAKICAgICJIb3N0IjogImh0dHBiaW4ub3JnIiwgCiAgICAiVXNlci1BZ2VudCI6ICJweXRob24tcmVxdWVzdHMvMi4zLjAgQ1B5dGhvbi8yLjcuNSBEYXJ3aW4vMTMuMi4wIiwgCiAgICAiWC1SZXF1ZXN0LUlkIjogIjE1ODlmMjgzLWRkYjMtNGU0YS1hYTMzLWVjM2I0NGVlY2JjMiIKICB9LCAKICAib3JpZ2luIjogIjguMjYuMTU3LjEyOCIsIAogICJ1cmwiOiAiaHR0cHM6Ly9odHRwYmluLm9yZy9nZXQiCn0=", "encoding": null}, "headers": {"content-length": ["353"], "server": ["gunicorn/18.0"], "connection": ["keep-alive"], "access-control-allow-credentials": ["true"], "date": ["Fri, 22 Aug 2014 18:11:35 GMT"], "access-control-allow-origin": ["*"], "content-type": ["application/json"]}, "status": {"message": "OK", "code": 200}, "url": "https://httpbin.org/get"}, "recorded_at": "2014-08-22T18:11:35"}], "recorded_with": "betamax/0.4.0"}
1 change: 1 addition & 0 deletions test/fixtures/me_failure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept": ["*/*"], "Content-Type": ["application/json"], "Accept-Encoding": ["gzip, deflate"], "Authorization": ["bearer NOT_A_CODE"], "User-Agent": ["python-requests/2.3.0 CPython/2.7.5 Darwin/13.2.0"]}, "method": "GET", "uri": "https://api.uber.com/v1/me"}, "response": {"body": {"string": "{\"message\":\"Invalid OAuth 2.0 credentials provided.\",\"code\":\"unauthorized\"}", "encoding": null}, "headers": {"content-length": ["75"], "server": ["nginx"], "connection": ["keep-alive"], "date": ["Fri, 22 Aug 2014 19:22:26 GMT"], "x-uber-app": ["uberex-nonsandbox"], "content-type": ["application/json"]}, "status": {"message": "Unauthorized", "code": 401}, "url": "https://api.uber.com/v1/me"}, "recorded_at": "2014-08-22T19:22:25"}], "recorded_with": "betamax/0.4.0"}
1 change: 1 addition & 0 deletions test/fixtures/me_success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept": ["*/*"], "Content-Type": ["application/json"], "Accept-Encoding": ["gzip, deflate"], "Authorization": ["bearer vX0ye7xeg42vNcBtWv59k9K0WjB5qH"], "User-Agent": ["python-requests/2.3.0 CPython/2.7.5 Darwin/13.2.0"]}, "method": "GET", "uri": "https://api.uber.com/v1/me"}, "response": {"body": {"base64_string": "H4sIAAAAAAAAA0WMyw7CIBRE/4W1tLWlULpy78YPaNJcHhXsA0Ihxhj/XRoXLuecmXkjb2VMQaMemRj93g/lUKrzs/bOhiga2HkhF5fUFNwWi03HoawYkTXUDZ86RqhQZ8K64uH1HZ3QZMMexw3W4/EKaTewZLzAn94g2Nlk6INb3SidOrrKvAjPUK9gl5zn3/aShA6FdGtWKVmVTcsqAYwTTFnbYQICMFSa4pZIKRinilOOPl8CtsPG2gAAAA==", "encoding": null}, "headers": {"x-rate-limit-remaining": ["999"], "content-language": ["en"], "content-encoding": ["gzip"], "transfer-encoding": ["chunked"], "strict-transport-security": ["max-age=2592000"], "server": ["nginx"], "connection": ["keep-alive"], "x-rate-limit-reset": ["1408737600"], "x-uber-app": ["uberex-nonsandbox"], "date": ["Fri, 22 Aug 2014 19:22:26 GMT"], "x-rate-limit-limit": ["1000"], "content-type": ["application/json"]}, "status": {"message": "OK", "code": 200}, "url": "https://api.uber.com/v1/me"}, "recorded_at": "2014-08-22T19:22:25"}], "recorded_with": "betamax/0.4.0"}
1 change: 1 addition & 0 deletions test/fixtures/preserve_exact_bytes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"base64_string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["python-requests/2.3.0 CPython/2.7.5 Darwin/13.2.0"]}, "method": "GET", "uri": "https://httpbin.org/get"}, "response": {"body": {"base64_string": "ewogICJhcmdzIjoge30sIAogICJoZWFkZXJzIjogewogICAgIkFjY2VwdCI6ICIqLyoiLCAKICAgICJBY2NlcHQtRW5jb2RpbmciOiAiZ3ppcCwgZGVmbGF0ZSIsIAogICAgIkNvbm5lY3Rpb24iOiAiY2xvc2UiLCAKICAgICJIb3N0IjogImh0dHBiaW4ub3JnIiwgCiAgICAiVXNlci1BZ2VudCI6ICJweXRob24tcmVxdWVzdHMvMi4zLjAgQ1B5dGhvbi8yLjcuNSBEYXJ3aW4vMTMuMi4wIiwgCiAgICAiWC1SZXF1ZXN0LUlkIjogImFkYmJkMTUzLTk1MjYtNDk4Ni04NTI1LTZjNWUxMGNkNDA5ZSIKICB9LCAKICAib3JpZ2luIjogIjguMjYuMTU3LjEyOCIsIAogICJ1cmwiOiAiaHR0cHM6Ly9odHRwYmluLm9yZy9nZXQiCn0=", "encoding": null}, "headers": {"content-length": ["353"], "server": ["gunicorn/18.0"], "connection": ["keep-alive"], "access-control-allow-credentials": ["true"], "date": ["Fri, 22 Aug 2014 18:11:35 GMT"], "access-control-allow-origin": ["*"], "content-type": ["application/json"]}, "status": {"message": "OK", "code": 200}, "url": "https://httpbin.org/get"}, "recorded_at": "2014-08-22T18:11:34"}], "recorded_with": "betamax/0.4.0"}
1 change: 1 addition & 0 deletions test/fixtures/submit_failure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "code=not_a_code&redirect_uri=https%3A%2F%2Flocalhost%3ANone%2Fsubmit&grant_type=authorization_code", "encoding": "utf-8"}, "headers": {"Content-Length": ["98"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["python-requests/2.3.0 CPython/2.7.5 Darwin/13.2.0"], "Content-Type": ["application/x-www-form-urlencoded"], "Authorization": ["Basic X3Y1QmNlNGZ6U0xsTWlJcTgyT05YWGtnZFcwOFBYSlc6QzJkZW1iY3JJV3ljWlBYcVE0SzY1RW1pTFRzRWFOSnAwS045VkJLUQ=="]}, "method": "POST", "uri": "https://login.uber.com/oauth/token"}, "response": {"body": {"string": "{\"error\": \"invalid_grant\"}", "encoding": null}, "headers": {"content-length": ["26"], "server": ["nginx"], "connection": ["keep-alive"], "pragma": ["no-cache"], "cache-control": ["no-store"], "date": ["Fri, 22 Aug 2014 18:40:19 GMT"], "x-uber-app": ["login"], "content-type": ["application/json"]}, "status": {"message": "BAD REQUEST", "code": 400}, "url": "https://login.uber.com/oauth/token"}, "recorded_at": "2014-08-22T18:40:19"}], "recorded_with": "betamax/0.4.0"}
1 change: 1 addition & 0 deletions test/fixtures/submit_success.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"http_interactions": [{"request": {"body": {"string": "code=eIzpzFBUv1X57AFmoKPSMBZrAnb4nK&redirect_uri=https%3A%2F%2Flocalhost%3ANone%2Fsubmit&grant_type=authorization_code", "encoding": "utf-8"}, "headers": {"Content-Length": ["118"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "User-Agent": ["python-requests/2.3.0 CPython/2.7.5 Darwin/13.2.0"], "Content-Type": ["application/x-www-form-urlencoded"], "Authorization": ["Basic X3Y1QmNlNGZ6U0xsTWlJcTgyT05YWGtnZFcwOFBYSlc6QzJkZW1iY3JJV3ljWlBYcVE0SzY1RW1pTFRzRWFOSnAwS045VkJLUQ=="]}, "method": "POST", "uri": "https://login.uber.com/oauth/token"}, "response": {"body": {"string": "{\"error\": \"access_denied\"}", "encoding": null}, "headers": {"content-length": ["26"], "server": ["nginx"], "connection": ["keep-alive"], "pragma": ["no-cache"], "cache-control": ["no-store"], "date": ["Fri, 22 Aug 2014 18:39:07 GMT"], "x-uber-app": ["login"], "content-type": ["application/json"]}, "status": {"message": "BAD REQUEST", "code": 400}, "url": "https://login.uber.com/oauth/token"}, "recorded_at": "2014-08-22T18:39:07"}], "recorded_with": "betamax/0.4.0"}

0 comments on commit a07de3b

Please sign in to comment.