# 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)


import faker
import pytest
from sevenbridges.errors import SbgError



generator = faker.Factory.create()


@pytest.mark.parametrize("visibility", ["private", "public", None])
def test_apps_query(api, given, verifier, visibility):
    # preconditions
    total = 10
    given.app.apps_exist(visibility, total)

    # action
    apps = api.apps.query(visibility=visibility)

    # verification
    assert apps.total == total
    assert len(apps) == total

    verifier.app.apps_fetched(visibility)


def test_apps_get_revision(api, given, verifier):
    # preconditions

# 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_apps.py
import faker
import pytest
from sevenbridges.errors import SbgError




generator = faker.Factory.create()


@pytest.mark.parametrize("visibility", ["private", "public", None])
def test_apps_query(api, given, verifier, visibility):
    # preconditions
    total = 10
    given.app.apps_exist(visibility, total)

    # action
    apps = api.apps.query(visibility=visibility)

    # verification
    assert apps.total == total
    assert len(apps) == total

    verifier.app.apps_fetched(visibility)


def test_apps_get_revision(api, given, verifier):
    # preconditions

    app_id = 'me/my-project/my-app'