예제 #1
0
    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.'))
예제 #2
0
    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.'))
예제 #3
0
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.'))
예제 #4
0
    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'
예제 #5
0
    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'
예제 #6
0
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'
예제 #7
0
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'
예제 #8
0
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'
예제 #9
0
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'
예제 #10
0
    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'
예제 #11
0
    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'