def test_get_workflow_id_error(self, error_exit): args = Namespace(workflow_id=None) nfn.get_workflow_id(self.df2, args) error_exit.assert_called_once_with( ('There are multiple workflows in this file. ' 'You must provide a workflow ID as an argument.'))
def test_get_workflow_id_error(self, error_exit): """It errors when there are multiple workflow IDs to choose.""" _, df2 = self.setup_dataframes() args = Namespace(workflow_id=None) nfn.get_workflow_id(df2, args) error_exit.assert_called_once_with( ('There are multiple workflows in this file. ' 'You must provide a workflow ID as an argument.'))
def test_get_workflow_id_error(error_exit): """It errors when there are multiple workflow IDs to choose.""" _, df2 = set_up() args = Namespace(workflow_id=None) nfn.get_workflow_id(df2, args) error_exit.assert_called_once_with( ('There are multiple workflows in this file. ' 'You must provide a workflow ID as an argument.'))
def test_get_workflow_id_unique(self): """It finds a unique workflow ID.""" df1, _ = self.setup_dataframes() args = Namespace(workflow_id=None) workflow_id = nfn.get_workflow_id(df1, args) assert workflow_id == '1001'
def test_get_workflow_id_01(self): """It returns a given workflow ID.""" _, df2 = self.setup_dataframes() args = Namespace(workflow_id='1001') workflow_id = nfn.get_workflow_id(df2, args) assert workflow_id == '1001'
def test_get_workflow_id_unique(): """It finds a unique workflow ID.""" df1, _ = set_up() args = Namespace(workflow_id=None) workflow_id = nfn.get_workflow_id(df1, args) assert workflow_id == '1001'
def test_get_workflow_id_01(): """It handles returns a given workflow ID.""" _, df2 = set_up() args = Namespace(workflow_id='1001') workflow_id = nfn.get_workflow_id(df2, args) assert workflow_id == '1001'
def test_get_workflow_id_unique(self): args = Namespace(workflow_id=None) workflow_id = nfn.get_workflow_id(self.df1, args) assert workflow_id == '1001'
def test_get_workflow_id_given(self): args = Namespace(workflow_id='1001') workflow_id = nfn.get_workflow_id(self.df2, args) assert workflow_id == '1001'