# Path: models/groups.py
# class Groups(bases.BaseModel):
# 
# 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, memberships, profiles
    import sys
import warnings
import pytest
Tests for the Groups Model
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
try:
except ImportError:
    print("WARNING: Cannot Load builtins for py3 compatibility.", file=sys.stderr)





warnings.simplefilter("error")  # Make All warnings errors while testing.

def test_required_fields_blank(dbsession):
    """
    Groups must have a name.
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    """
    group = groups.Groups()
    group.save()

    # name is blank
    with pytest.raises(IntegrityError):
        dbsession.commit()

def test_create_group(dbsession):
    """
    Create a Group
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    """

# Path: models/groups.py
# class Groups(bases.BaseModel):
# 
# 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_groups.py
    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from sqlalchemy.exc import IntegrityError
from models import groups, memberships, profiles
    import sys
import warnings
import pytest

Tests for the Groups Model
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
try:
except ImportError:
    print("WARNING: Cannot Load builtins for py3 compatibility.", file=sys.stderr)





warnings.simplefilter("error")  # Make All warnings errors while testing.

def test_required_fields_blank(dbsession):
    """
    Groups must have a name.
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    """
    group = groups.Groups()
    group.save()

    # name is blank
    with pytest.raises(IntegrityError):
        dbsession.commit()

def test_create_group(dbsession):
    """
    Create a Group
    :param sqlalchemy.orm.session.Session dbsession: pytest fixture for database session
    """

    group = groups.Groups(name='A New Group')