Exemple #1
0
def test_invenio_sip2():
    """Test invenio-sip2 module install."""
    assert check_sip2_module()
Exemple #2
0
from rero_ils.modules.items.api import Item
from rero_ils.modules.loans.api import Loan
from rero_ils.modules.loans.models import LoanAction, LoanState
from rero_ils.modules.notifications.api import NotificationsSearch
from rero_ils.modules.notifications.dispatcher import Dispatcher
from rero_ils.modules.notifications.models import NotificationType
from rero_ils.modules.notifications.utils import number_of_notifications_sent
from rero_ils.modules.selfcheck.api import authorize_patron, enable_patron, \
    item_information, patron_information, patron_status, selfcheck_checkin, \
    selfcheck_checkout, selfcheck_login, selfcheck_renew, system_status, \
    validate_patron_account
from rero_ils.modules.selfcheck.utils import check_sip2_module

# skip tests if invenio-sip2 module is not installed
pytestmark = pytest.mark.skipif(not check_sip2_module(),
                                reason='invenio-sip2 not installed')


def test_invenio_sip2():
    """Test invenio-sip2 module install."""
    assert check_sip2_module()


def test_selfcheck_login(librarian_martigny, selfcheck_librarian_martigny):
    """Test selfcheck client login."""

    # test failed login
    response = selfcheck_login('invalid_user',
                               'invalid_password',
                               terminal_ip='127.0.0.1')