# Path: sevenbridges/errors.py
# class SbgError(Exception):
#     """Base class for SBG errors.
# 
#     Provides a base exception for all errors
#     that are thrown by sevenbridges-python library.
#     """
# 
#     def __init__(self, message=None, code=None, status=None, more_info=None):
#         """
#         :param code: Custom error code
#         :param status: Http status code.
#         :param message: Message describing the error.
#         """
#         self.code = code
#         self.status = status
#         self.message = message
#         self.more_info = more_info
# 
#     def __str__(self):
#         return str(self.message)


from datetime import datetime
from sevenbridges.errors import SbgError
import faker
import pytest
        assert task.status == 'RUNNING'
        verifier.task.action_performed(id, 'run')
    else:
        assert task.status == 'DRAFT'
        verifier.task.action_performed(id, 'run')


@pytest.mark.parametrize("run", [True, False])
def test_clone_task(api, given, run, verifier):
    # precondition
    status = 'QUEUED' if run else 'DRAFT'
    id = generator.uuid4()
    given.task.task_exists(id=id, status=status)
    given.task.task_can_be_clone(id=id, status=status)

    # action
    task = api.tasks.get(id)
    # abort
    task.clone(run=run)

    # verification
    assert task.status == status
    verifier.task.action_performed(id, 'clone')


def test_modify_inputs(api, given, verifier):
    # precondition
    owner = generator.user_name()
    project_short_name = generator.slug()
    project_id = f'{owner}/{project_short_name}'

# Path: sevenbridges/errors.py
# class SbgError(Exception):
#     """Base class for SBG errors.
# 
#     Provides a base exception for all errors
#     that are thrown by sevenbridges-python library.
#     """
# 
#     def __init__(self, message=None, code=None, status=None, more_info=None):
#         """
#         :param code: Custom error code
#         :param status: Http status code.
#         :param message: Message describing the error.
#         """
#         self.code = code
#         self.status = status
#         self.message = message
#         self.more_info = more_info
# 
#     def __str__(self):
#         return str(self.message)


# Path: tests/test_tasks.py
from datetime import datetime
from sevenbridges.errors import SbgError
import faker
import pytest

        assert task.status == 'RUNNING'
        verifier.task.action_performed(id, 'run')
    else:
        assert task.status == 'DRAFT'
        verifier.task.action_performed(id, 'run')


@pytest.mark.parametrize("run", [True, False])
def test_clone_task(api, given, run, verifier):
    # precondition
    status = 'QUEUED' if run else 'DRAFT'
    id = generator.uuid4()
    given.task.task_exists(id=id, status=status)
    given.task.task_can_be_clone(id=id, status=status)

    # action
    task = api.tasks.get(id)
    # abort
    task.clone(run=run)

    # verification
    assert task.status == status
    verifier.task.action_performed(id, 'clone')


def test_modify_inputs(api, given, verifier):
    # precondition
    owner = generator.user_name()
    project_short_name = generator.slug()
    project_id = f'{owner}/{project_short_name}'

    given.project.exists(id=project_id)