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"
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", )
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", )
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)
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"
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)