def test_create_cas_destination(): target = {'name': 'caslocal', 'destinationType': 'cas', 'casServerName': 'camelot', 'casLibrary': 'round', 'destinationTable': 'table', 'description': None } with mock.patch('sasctl._services.model_publish.ModelPublish.post') as post: mp.create_cas_destination('caslocal', server='camelot', library='round', table='table') assert post.called json = post.call_args[1]['json'] for k in json.keys(): assert json[k] == target[k]
def test_create_cas_destination(self): from sasctl.services import model_publish as mp dest = mp.create_cas_destination(self.CAS_DEST, 'Public', self.CAS_MODEL_TABLE) assert dest.name == self.CAS_DEST assert dest.destinationType == 'cas' assert dest.destinationTable == self.CAS_MODEL_TABLE
def test_create_cas_destination(self): dest = mp.create_cas_destination( 'caslocal', 'Public', 'sasctl_models', description='Test CAS publish destination from sasctl.') assert dest.name == 'caslocal' assert dest.destinationType == 'cas' assert dest.casLibrary == 'Public' assert dest.casServerName == 'cas-shared-default' assert dest.destinationTable == 'sasctl_models' assert dest.description == 'Test CAS publish destination from sasctl.'