# Path: models/groups.py
# class Groups(bases.BaseModel):
# 
# Path: models/logins.py
# class Logins(bases.BaseModel):
#     def get_by_email(cls, email):
#     def is_valid_password(self, password):
#     def password(self):
#     def password(self, value):
#     def validate_email(self, key, address):  # pylint: disable=unused-argument,no-self-use
# 
# Path: models/memberships.py
# class Memberships(bases.BaseModel):
# 
# Path: models/profiles.py
# class Profiles(bases.BaseModel):
#     def get_by_email(cls, email):
#     def validate_email(self, key, address):  # pylint: disable=unused-argument,no-self-use


    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from sqlalchemy.exc import IntegrityError
from models import groups, logins, memberships, profiles
    import sys
import warnings
import pytest
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    :param list(str) testdata: pytest fixture listing test data tokens.
    """
    # Include testdata so we know there are at least some records in table to search
    assert profiles.Profiles.get_by_email('') is None

def test_get_by_email_unknonw(dbsession, testdata):  # pylint: disable=unused-argument,redefined-outer-name
    """
    Non-existing profiles shouldn't be found
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    :param list(str) testdata: pytest fixture listing test data tokens.
    """
    assert '1ced@4c41.a936' not in testdata
    assert profiles.Profiles.get_by_email('1ced@4c41.a936') is None

def test_get_by_email(dbsession):  # pylint: disable=unused-argument
    """ Create Profiles, and then fetch them by email address. """
    profile = profiles.Profiles(full_name='7cfeb824 a59fafe0f656', email='2c32@4fc0.beec')

    # Unsaved profiles shouldn't be found
    assert profiles.Profiles.get_by_email('2c32@4fc0.beec') is None

    profile.save()

    # Now it can be found.
    assert profiles.Profiles.get_by_email('2c32@4fc0.beec') == profile

def test_login_relation(dbsession):  # pylint: disable=unused-argument
    """ Profiles can have a Logins relation. """
    profile = profiles.Profiles(full_name='4176898b 61d515c6e423', email='61b4@4a1d.9f2b')

# Path: models/groups.py
# class Groups(bases.BaseModel):
# 
# Path: models/logins.py
# class Logins(bases.BaseModel):
#     def get_by_email(cls, email):
#     def is_valid_password(self, password):
#     def password(self):
#     def password(self, value):
#     def validate_email(self, key, address):  # pylint: disable=unused-argument,no-self-use
# 
# Path: models/memberships.py
# class Memberships(bases.BaseModel):
# 
# Path: models/profiles.py
# class Profiles(bases.BaseModel):
#     def get_by_email(cls, email):
#     def validate_email(self, key, address):  # pylint: disable=unused-argument,no-self-use


# Path: tests/models/test_profiles.py
    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from sqlalchemy.exc import IntegrityError
from models import groups, logins, memberships, profiles
    import sys
import warnings
import pytest

    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    :param list(str) testdata: pytest fixture listing test data tokens.
    """
    # Include testdata so we know there are at least some records in table to search
    assert profiles.Profiles.get_by_email('') is None

def test_get_by_email_unknonw(dbsession, testdata):  # pylint: disable=unused-argument,redefined-outer-name
    """
    Non-existing profiles shouldn't be found
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    :param list(str) testdata: pytest fixture listing test data tokens.
    """
    assert '1ced@4c41.a936' not in testdata
    assert profiles.Profiles.get_by_email('1ced@4c41.a936') is None

def test_get_by_email(dbsession):  # pylint: disable=unused-argument
    """ Create Profiles, and then fetch them by email address. """
    profile = profiles.Profiles(full_name='7cfeb824 a59fafe0f656', email='2c32@4fc0.beec')

    # Unsaved profiles shouldn't be found
    assert profiles.Profiles.get_by_email('2c32@4fc0.beec') is None

    profile.save()

    # Now it can be found.
    assert profiles.Profiles.get_by_email('2c32@4fc0.beec') == profile

def test_login_relation(dbsession):  # pylint: disable=unused-argument
    """ Profiles can have a Logins relation. """
    profile = profiles.Profiles(full_name='4176898b 61d515c6e423', email='61b4@4a1d.9f2b')

    login = logins.Logins(password='104d4cec-9425-4e37-9de2-242c6d772eea')