Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add missing cassettes

Maciej Korycinskie5ecefa7c2e4
diff --git a/tests/api/app/mutations/cassettes/test_app_fetch_manifest.yaml b/tests/api/app/mutations/cassettes/test_app_fetch_manifest.yaml
new file mode 100644
index 0000000000..cc81fb7b8c
--- /dev/null
+++ b/tests/api/app/mutations/cassettes/test_app_fetch_manifest.yaml
@@ -0,0 +1,53 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - python-requests/2.23.0
+ method: GET
+ uri: http://localhost:3000/manifest
+ response:
+ body:
+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about\": \"\
+ Lorem ipsum\",\n \"dataPrivacy\": \"Lorem ipsum\",\n \"dataPrivacyUrl\"\
+ : \"http://localhost:8888/app-data-privacy\",\n \"homepageUrl\": \"http://localhost:8888/homepage\"\
+ ,\n \"supportUrl\": \"http://localhost:8888/support\",\n \"configurationUrl\"\
+ : \"htpp://localhost:8888/configuration\",\n \"appUrl\": \"http://localhost:8888/app\"\
+ ,\n \"tokenTargetUrl\": \"http://localhost:3000/register\",\n \"id\": \"\
+ app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\
+ \n ]\n}"
+ headers:
+ Access-Control-Allow-Credentials:
+ - 'true'
+ Cache-Control:
+ - no-cache
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '497'
+ Content-Type:
+ - application/json; charset=utf-8
+ Date:
+ - Tue, 26 May 2020 11:13:49 GMT
+ ETag:
+ - W/"1f1-oiRdlJBgfkdPvTIg7KJUq8+ZGPA"
+ Expires:
+ - '-1'
+ Pragma:
+ - no-cache
+ Vary:
+ - Origin, Accept-Encoding
+ X-Content-Type-Options:
+ - nosniff
+ X-Powered-By:
+ - Express
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/tests/api/app/mutations/cassettes/test_app_fetch_manifest_incorrect_permission_in_manifest.yaml b/tests/api/app/mutations/cassettes/test_app_fetch_manifest_incorrect_permission_in_manifest.yaml
new file mode 100644
index 0000000000..0ff84df408
--- /dev/null
+++ b/tests/api/app/mutations/cassettes/test_app_fetch_manifest_incorrect_permission_in_manifest.yaml
@@ -0,0 +1,53 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - python-requests/2.23.0
+ method: GET
+ uri: http://localhost:3000/manifest-with-wrong-perm
+ response:
+ body:
+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about\": \"\
+ Lorem ipsum\",\n \"dataPrivacy\": \"Lorem ipsum\",\n \"dataPrivacyUrl\"\
+ : \"http://localhost:8888/app-data-privacy\",\n \"homepageUrl\": \"http://localhost:8888/homepage\"\
+ ,\n \"supportUrl\": \"http://localhost:8888/support\",\n \"configurationUrl\"\
+ : \"htpp://localhost:8888/configuration\",\n \"appUrl\": \"http://localhost:8888/app\"\
+ ,\n \"tokenTargetUrl\": \"http://localhost:3000/register\",\n \"id\": \"\
+ app2\",\n \"permissions\": [\n \"MANAGE_WRONG\",\n \"MANAGE_ORDERS\"\
+ \n ]\n}"
+ headers:
+ Access-Control-Allow-Credentials:
+ - 'true'
+ Cache-Control:
+ - no-cache
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '497'
+ Content-Type:
+ - application/json; charset=utf-8
+ Date:
+ - Tue, 26 May 2020 11:33:34 GMT
+ ETag:
+ - W/"1f1-DdnOjcNwiItJDm/ZAgrFxS2ejHE"
+ Expires:
+ - '-1'
+ Pragma:
+ - no-cache
+ Vary:
+ - Origin, Accept-Encoding
+ X-Content-Type-Options:
+ - nosniff
+ X-Powered-By:
+ - Express
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/tests/api/app/mutations/cassettes/test_app_fetch_manifest_unable_to_connect.yaml b/tests/api/app/mutations/cassettes/test_app_fetch_manifest_unable_to_connect.yaml
new file mode 100644
index 0000000000..5e440e58a1
--- /dev/null
+++ b/tests/api/app/mutations/cassettes/test_app_fetch_manifest_unable_to_connect.yaml
@@ -0,0 +1,46 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - python-requests/2.23.0
+ method: GET
+ uri: http://localhost:3000/manifest-doesnt-exist
+ response:
+ body:
+ string: '{}'
+ headers:
+ Access-Control-Allow-Credentials:
+ - 'true'
+ Cache-Control:
+ - no-cache
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '2'
+ Content-Type:
+ - application/json; charset=utf-8
+ Date:
+ - Tue, 26 May 2020 11:44:12 GMT
+ ETag:
+ - W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"
+ Expires:
+ - '-1'
+ Pragma:
+ - no-cache
+ Vary:
+ - Origin, Accept-Encoding
+ X-Content-Type-Options:
+ - nosniff
+ X-Powered-By:
+ - Express
+ status:
+ code: 404
+ message: Not Found
+version: 1
diff --git a/tests/api/app/mutations/cassettes/test_app_fetch_manifest_wrong_format_of_response.yaml b/tests/api/app/mutations/cassettes/test_app_fetch_manifest_wrong_format_of_response.yaml
new file mode 100644
index 0000000000..870e287a37
--- /dev/null
+++ b/tests/api/app/mutations/cassettes/test_app_fetch_manifest_wrong_format_of_response.yaml
@@ -0,0 +1,46 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - '*/*'
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ User-Agent:
+ - python-requests/2.23.0
+ method: GET
+ uri: http://localhost:3000/manifest-wrong-format
+ response:
+ body:
+ string: ''
+ headers:
+ Access-Control-Allow-Credentials:
+ - 'true'
+ Cache-Control:
+ - no-cache
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '2'
+ Content-Type:
+ - application/json; charset=utf-8
+ Date:
+ - Tue, 26 May 2020 12:43:30 GMT
+ ETag:
+ - W/"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w"
+ Expires:
+ - '-1'
+ Pragma:
+ - no-cache
+ Vary:
+ - Origin, Accept-Encoding
+ X-Content-Type-Options:
+ - nosniff
+ X-Powered-By:
+ - Express
+ status:
+ code: 200
+ message: OK
+version: 1