# pylint: disable-msg=C0103,W0603
# Note about pylint disables - pylint thinks my globals are constants,
# and they're not, so disabling C0103. It also doesn't like globals,
# which I don't care much about because I want to use them here in my
# tests.
"""test-login-api.py - Tests of Login API"""
import logging
from .TestUtil import get_active_session, get_response_with_jwt, log_response_error

LOGGER = logging.getLogger()
TEST_SESSION = get_active_session()

def test_login():
    """LoginAPI: Test login API"""
    resp = get_response_with_jwt(TEST_SESSION, 'GET', '/login', None, True)
    log_response_error(resp)
    assert resp.status_code == 200
    json = resp.json()
    {% for obj in objects %}
    assert len(json['{{obj.name}}s']) == 0{% endfor %}
