Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename app command. Re-generate vcr cassettes
Maciej Korycinski05b8981f7967
diff --git a/saleor/app/management/commands/create_app_from_manifest.py b/saleor/app/management/commands/install_app.pysimilarity index 93%rename from saleor/app/management/commands/create_app_from_manifest.pyrename to saleor/app/management/commands/install_app.pyindex 4208f15462..2b007e63cf 100644--- a/saleor/app/management/commands/create_app_from_manifest.py+++ b/saleor/app/management/commands/install_app.py@@ -9,12 +9,12 @@ from django.core.validators import URLValidatorfrom ....core import JobStatusfrom ...installation_utils import install_app-from ...models import AppJob+from ...models import AppInstallationfrom .utils import clean_permissionsclass Command(BaseCommand):- help = "Used to create new app."+ help = "Used to install new app."def add_arguments(self, parser: CommandParser) -> None:parser.add_argument("manifest-url", help="Url with app manifest.", type=str)@@ -43,7 +43,7 @@ class Command(BaseCommand):permissions = clean_permissions(manifest_data.get("permissions", []))- app_job = AppJob.objects.create(+ app_job = AppInstallation.objects.create(app_name=manifest_data["name"], manifest_url=manifest_url)if permissions:diff --git a/tests/cassettes/test_creates_app_from_manifest.yaml b/tests/cassettes/test_creates_app_from_manifest.yamlindex c452b2026d..d5af3d283c 100644--- a/tests/cassettes/test_creates_app_from_manifest.yaml+++ b/tests/cassettes/test_creates_app_from_manifest.yaml@@ -14,13 +14,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -30,13 +30,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:35:55 GMT+ - Wed, 20 May 2020 07:56:34 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -65,13 +65,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -81,13 +81,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:35:55 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -102,7 +102,7 @@ interactions:code: 200message: OK- request:- body: '{"auth_token": "skoQA796LD5vgYMzeSNd3QuScYbG8F"}'+ body: '{"auth_token": "mKWouu0pEUbGmQzohwWI78gRKAVRUP"}'headers:Accept:- '*/*'@@ -122,8 +122,8 @@ interactions:uri: http://localhost:3000/registerresponse:body:- string: "{\n \"auth_token\": \"skoQA796LD5vgYMzeSNd3QuScYbG8F\",\n \"id\"\- : 20\n}"+ string: "{\n \"auth_token\": \"mKWouu0pEUbGmQzohwWI78gRKAVRUP\",\n \"id\"\+ : 33\n}"headers:Access-Control-Allow-Credentials:- 'true'@@ -138,13 +138,13 @@ interactions:Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:35:55 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"40-W2R9WQhs0bfuwZPjNWzjUatbdFg"+ - W/"40-bIKPQPnBZvb3yMm4XzcyWZDhYdM"Expires:- '-1'Location:- - http://localhost:3000/register/20+ - http://localhost:3000/register/33Pragma:- no-cacheVary:diff --git a/tests/cassettes/test_creates_app_from_manifest_activate_app.yaml b/tests/cassettes/test_creates_app_from_manifest_activate_app.yamlindex 3676cfebfe..0782bdc43d 100644--- a/tests/cassettes/test_creates_app_from_manifest_activate_app.yaml+++ b/tests/cassettes/test_creates_app_from_manifest_activate_app.yaml@@ -14,13 +14,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -30,13 +30,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:38:40 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -65,13 +65,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -81,13 +81,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:38:40 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -102,7 +102,7 @@ interactions:code: 200message: OK- request:- body: '{"auth_token": "umPfSpRLbHIAfERSyxcinanPNV0c71"}'+ body: '{"auth_token": "23tlfEQfMSrESRqUpbCTMy8ay0EwJg"}'headers:Accept:- '*/*'@@ -122,8 +122,8 @@ interactions:uri: http://localhost:3000/registerresponse:body:- string: "{\n \"auth_token\": \"umPfSpRLbHIAfERSyxcinanPNV0c71\",\n \"id\"\- : 21\n}"+ string: "{\n \"auth_token\": \"23tlfEQfMSrESRqUpbCTMy8ay0EwJg\",\n \"id\"\+ : 34\n}"headers:Access-Control-Allow-Credentials:- 'true'@@ -138,13 +138,13 @@ interactions:Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:38:40 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"40-IeSY594Wsx2DnlKP2tiXVGPvB78"+ - W/"40-i+NNNM2WFjhlDPsT878oGqgzFoM"Expires:- '-1'Location:- - http://localhost:3000/register/21+ - http://localhost:3000/register/34Pragma:- no-cacheVary:diff --git a/tests/cassettes/test_creates_app_from_manifest_app_has_all_required_permissions.yaml b/tests/cassettes/test_creates_app_from_manifest_app_has_all_required_permissions.yamlindex a63f375460..011fb23b95 100644--- a/tests/cassettes/test_creates_app_from_manifest_app_has_all_required_permissions.yaml+++ b/tests/cassettes/test_creates_app_from_manifest_app_has_all_required_permissions.yaml@@ -14,13 +14,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -30,13 +30,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:39:14 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -65,13 +65,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -81,13 +81,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:39:14 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -102,7 +102,7 @@ interactions:code: 200message: OK- request:- body: '{"auth_token": "mmEXydZgjYnPRo8ilvlpuSJRfzDzCb"}'+ body: '{"auth_token": "woTsA9BIEc0dl93Q2YeIMwuWTlkzgb"}'headers:Accept:- '*/*'@@ -122,8 +122,8 @@ interactions:uri: http://localhost:3000/registerresponse:body:- string: "{\n \"auth_token\": \"mmEXydZgjYnPRo8ilvlpuSJRfzDzCb\",\n \"id\"\- : 22\n}"+ string: "{\n \"auth_token\": \"woTsA9BIEc0dl93Q2YeIMwuWTlkzgb\",\n \"id\"\+ : 35\n}"headers:Access-Control-Allow-Credentials:- 'true'@@ -138,13 +138,13 @@ interactions:Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:39:14 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"40-niLZoRkUsxsjp8mtGuSXkN1RMno"+ - W/"40-aCOF0hheZTFao6o1LNBg5/9AcHc"Expires:- '-1'Location:- - http://localhost:3000/register/22+ - http://localhost:3000/register/35Pragma:- no-cacheVary:diff --git a/tests/cassettes/test_creates_app_from_manifest_installation_failed.yaml b/tests/cassettes/test_creates_app_from_manifest_installation_failed.yamlindex a665f22b03..8a22ca44a2 100644--- a/tests/cassettes/test_creates_app_from_manifest_installation_failed.yaml+++ b/tests/cassettes/test_creates_app_from_manifest_installation_failed.yaml@@ -14,13 +14,12 @@ interactions:uri: http://localhost:3000/manifest-wrongresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"register-wrong-format\",\n \"identificator\"\- : \"app2\"\n}"+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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\": \"register-wrong-format\",\n \"id\": \"app2\"\n}"headers:Access-Control-Allow-Credentials:- 'true'@@ -29,13 +28,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '448'+ - '427'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:43:50 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"1c0-JJiYGAsB1lIohC/29ugFSHRYbSM"+ - W/"1ab-ApGXdwifw96yQqDaesbw4RlSkIQ"Expires:- '-1'Pragma:@@ -64,13 +63,12 @@ interactions:uri: http://localhost:3000/manifest-wrongresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"register-wrong-format\",\n \"identificator\"\- : \"app2\"\n}"+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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\": \"register-wrong-format\",\n \"id\": \"app2\"\n}"headers:Access-Control-Allow-Credentials:- 'true'@@ -79,13 +77,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '448'+ - '427'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:43:50 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"1c0-JJiYGAsB1lIohC/29ugFSHRYbSM"+ - W/"1ab-ApGXdwifw96yQqDaesbw4RlSkIQ"Expires:- '-1'Pragma:diff --git a/tests/cassettes/test_creates_app_from_manifest_sends_token.yaml b/tests/cassettes/test_creates_app_from_manifest_sends_token.yamlindex ea6548619a..f10b9d49da 100644--- a/tests/cassettes/test_creates_app_from_manifest_sends_token.yaml+++ b/tests/cassettes/test_creates_app_from_manifest_sends_token.yaml@@ -14,13 +14,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -30,13 +30,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:40:17 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:@@ -65,13 +65,13 @@ interactions:uri: http://localhost:3000/manifestresponse:body:- string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"about_app\"\- : \"Lorem ipsum\",\n \"data_privacy\": \"Lorem ipsum\",\n \"data_privacy_url\"\- : \"http://localhost:8888/app-data-privacy\",\n \"homepage_url\": \"http://localhost:8888/homepage\"\- ,\n \"support_url\": \"http://localhost:8888/support\",\n \"configuration_url\"\- : \"htpp://localhost:8888/configuration\",\n \"app_url\": \"http://localhost:8888/app\"\- ,\n \"token_target_url\": \"http://localhost:3000/register\",\n \"identificator\"\- : \"app2\",\n \"permissions\": [\n \"MANAGE_USERS\",\n \"MANAGE_ORDERS\"\+ string: "{\n \"name\": \"app\",\n \"version\": \"1.0.0\",\n \"aboutApp\"\+ : \"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:@@ -81,13 +81,13 @@ interactions:Connection:- keep-aliveContent-Length:- - '521'+ - '500'Content-Type:- application/json; charset=utf-8Date:- - Thu, 14 May 2020 12:40:17 GMT+ - Wed, 20 May 2020 07:56:35 GMTETag:- - W/"209-nZ8IFYM5Y7abK3rAKwcp0Qk6oSw"+ - W/"1f4-qx17e+bDbZJtTZiNJJshOoM1U6s"Expires:- '-1'Pragma:diff --git a/tests/test_app_commands.py b/tests/test_app_commands.pyindex b7ae510d63..68c8cc2628 100644--- a/tests/test_app_commands.py+++ b/tests/test_app_commands.py@@ -4,7 +4,7 @@ import pytestimport requestsfrom django.core.management import call_command-from saleor.app.models import App, AppJob+from saleor.app.models import App, AppInstallationfrom saleor.core import JobStatusfrom saleor.core.permissions import get_permissions@@ -12,7 +12,7 @@ from saleor.core.permissions import get_permissions@pytest.mark.vcrdef test_creates_app_from_manifest():manifest_url = "http://localhost:3000/manifest"- call_command("create_app_from_manifest", manifest_url)+ call_command("install_app", manifest_url)app = App.objects.get()@@ -24,7 +24,7 @@ def test_creates_app_from_manifest():@pytest.mark.vcrdef test_creates_app_from_manifest_activate_app():manifest_url = "http://localhost:3000/manifest"- call_command("create_app_from_manifest", manifest_url, activate=True)+ call_command("install_app", manifest_url, activate=True)app = App.objects.get()@@ -38,7 +38,7 @@ def test_creates_app_from_manifest_app_has_all_required_permissions():manifest_url = "http://localhost:3000/manifest"permission_list = ["account.manage_users", "order.manage_orders"]expected_permission = get_permissions(permission_list)- call_command("create_app_from_manifest", manifest_url)+ call_command("install_app", manifest_url)app = App.objects.get()assert set(app.permissions.all()) == set(expected_permission)@@ -53,7 +53,7 @@ def test_creates_app_from_manifest_sends_token(monkeypatch):monkeypatch.setattr(requests, "post", mocked_post)manifest_url = "http://localhost:3000/manifest"- call_command("create_app_from_manifest", manifest_url)+ call_command("install_app", manifest_url)app = App.objects.get()token = app.tokens.all()[0].auth_token@@ -70,9 +70,9 @@ def test_creates_app_from_manifest_installation_failed():manifest_url = "http://localhost:3000/manifest-wrong"with pytest.raises(Exception):- call_command("create_app_from_manifest", manifest_url)+ call_command("install_app", manifest_url)- app_job = AppJob.objects.get()+ app_job = AppInstallation.objects.get()assert app_job.status == JobStatus.FAILED