コード例 #1
0
    def test_update(self, default_project, config):
        config.update_project_symbol_source(default_project, allow_multiple=False)

        updated = appconnect.AppStoreConnectConfig(
            type=config.type,
            id=config.id,
            name=config.name,
            appconnectIssuer=config.appconnectIssuer,
            appconnectKey=config.appconnectKey,
            appconnectPrivateKey=config.appconnectPrivateKey,
            itunesUser=config.itunesUser,
            itunesPassword=config.itunesPassword,
            itunesSession="A NEW COOKIE",
            itunesCreated=datetime.utcnow(),
            appName=config.appName,
            appId=config.appId,
            bundleId=config.bundleId,
            orgPublicId=config.orgPublicId,
            orgName=config.orgName,
        )

        updated.update_project_symbol_source(default_project, allow_multiple=False)

        current = appconnect.AppStoreConnectConfig.from_project_config(default_project, config.id)
        assert current.itunesSession == "A NEW COOKIE"
コード例 #2
0
 def config(self):
     return appconnect.AppStoreConnectConfig(
         type="appStoreConnect",
         id=uuid.uuid4().hex,
         name="Apple App Store Connect",
         appconnectIssuer="abc123" * 6,
         appconnectKey="abc123key",
         appconnectPrivateKey="----BEGIN PRIVATE KEY---- blabla",
         appName="My App",
         appId="123",
         bundleId="com.example.app",
     )
コード例 #3
0
 def config(self):
     return appconnect.AppStoreConnectConfig(
         type="appStoreConnect",
         id=uuid.uuid4().hex,
         name="Apple App Store Connect",
         appconnectIssuer="abc123" * 6,
         appconnectKey="abc123key",
         appconnectPrivateKey="----BEGIN PRIVATE KEY---- blabla",
         itunesUser="******",
         itunesPassword="******",
         itunesSession="THE-COOKIE",
         itunesCreated=datetime.utcnow(),
         appName="My App",
         appId="123",
         bundleId="com.example.app",
         orgPublicId="71105f98-7743-4844-ab70-2c901e2ea13d",
         orgName="Example Com",
     )
コード例 #4
0
    def test_update_no_matching_id(
            self, default_project: "Project",
            config: appconnect.AppStoreConnectConfig) -> None:
        config.update_project_symbol_source(default_project,
                                            allow_multiple=False)

        updated = appconnect.AppStoreConnectConfig(
            type=config.type,
            id=uuid.uuid4().hex,
            name=config.name,
            appconnectIssuer=config.appconnectIssuer,
            appconnectKey=config.appconnectKey,
            appconnectPrivateKey="A NEW KEY",
            appName=config.appName,
            appId=config.appId,
            bundleId=config.bundleId,
        )

        with pytest.raises(ValueError):
            updated.update_project_symbol_source(default_project,
                                                 allow_multiple=False)
コード例 #5
0
    def test_update(self, default_project: "Project",
                    config: appconnect.AppStoreConnectConfig) -> None:
        config.update_project_symbol_source(default_project,
                                            allow_multiple=False)

        updated = appconnect.AppStoreConnectConfig(
            type=config.type,
            id=config.id,
            name=config.name,
            appconnectIssuer=config.appconnectIssuer,
            appconnectKey=config.appconnectKey,
            appconnectPrivateKey="A NEW KEY",
            appName=config.appName,
            appId=config.appId,
            bundleId=config.bundleId,
        )

        updated.update_project_symbol_source(default_project,
                                             allow_multiple=False)

        current = appconnect.AppStoreConnectConfig.from_project_config(
            default_project, config.id)
        assert current.appconnectPrivateKey == "A NEW KEY"
コード例 #6
0
    def test_update_no_matching_id(self, default_project, config):
        config.update_project_symbol_source(default_project, allow_multiple=False)

        updated = appconnect.AppStoreConnectConfig(
            type=config.type,
            id=uuid.uuid4().hex,
            name=config.name,
            appconnectIssuer=config.appconnectIssuer,
            appconnectKey=config.appconnectKey,
            appconnectPrivateKey=config.appconnectPrivateKey,
            itunesUser=config.itunesUser,
            itunesPassword=config.itunesPassword,
            itunesSession="A NEW COOKIE",
            itunesCreated=datetime.utcnow(),
            appName=config.appName,
            appId=config.appId,
            bundleId=config.bundleId,
            orgPublicId=config.orgPublicId,
            orgName=config.orgName,
        )

        with pytest.raises(ValueError):
            updated.update_project_symbol_source(default_project, allow_multiple=False)