# Path: tests/api/base.py
# def get_fake_response(code=200, data=None):
#     response = mock.Mock()
#     response.status_code = code
#     response.data = data
#     return response
# 
# def get_fake_member_data(**kwargs):
#     data = {
#         'id': 'foo',
#         'user_id': 'baz',
#         'nickname': 'nick',
#     }
#     data.update(kwargs)
#     return data
# 
# def get_fake_group_data(**kwargs):
#     group_data = {
#         'id': 'foo',
#         'name': 'foobar',
#         'group_id': 'bar',
#         'created_at': 1302623328,
#         'updated_at': 1302623329,
#         'office_mode': False,
#     }
#     group_data.update(kwargs)
#     return group_data
# 
# Path: tests/api/base.py
# class TestCase(unittest.TestCase):
#     def assert_kwargs(self, mock, **kwargs):
#         __, m_kwargs = mock.call_args
#         for k, v in kwargs.items():
#             with self.subTest(key=k, value=v):
#                 self.assertEqual(m_kwargs.get(k), v)
# 
# Path: groupy/pagers.py
# class Pager:
# class GroupList(Pager):
# class ChatList(GroupList):
# class MessageList(Pager):
# class GalleryList(MessageList):
#     def __init__(self, manager, endpoint, **params):
#     def __getitem__(self, index):
#     def __iter__(self):
#     def set_next_page_params(self):
#     def fetch(self):
#     def fetch_next(self):
#     def autopage(self):
#     def set_next_page_params(self):
#     def __init__(self, manager, endpoint, **params):
#     def detect_mode(cls, **params):
#     def set_next_page_params(self):
#     def get_last_item_index(self):
#     def get_next_page_param(self, item):
#     def fetch_next(self):
#     def get_next_page_param(self, item):
# 
# Path: groupy/api/groups.py
# class Groups(base.Manager):
# class ChangeOwnersResult:
# class Group(base.ManagedResource):
#     def __init__(self, session):
#     def _raw_list(self, **params):
#     def list(self, page=1, per_page=10, omit=None):
#     def list_all(self, per_page=10, omit=None):
#     def list_former(self):
#     def get(self, id):
#     def create(self, name, description=None, image_url=None, share=None, **kwargs):
#     def update(self, id, name=None, description=None, image_url=None,
#                office_mode=None, share=None, **kwargs):
#     def destroy(self, id):
#     def join(self, group_id, share_token):
#     def rejoin(self, group_id):
#     def change_owners(self, group_id, owner_id):
#     def __init__(self, group_id, owner_id, status):
#     def is_success(self):
#     def __bool__(self):
#     def __init__(self, manager, **data):
#     def __repr__(self):
#     def __eq__(self, other):
#     def is_mine(self):
#     def post(self, text=None, attachments=None):
#     def update(self, name=None, description=None, image_url=None,
#                office_mode=None, share=None, **kwargs):
#     def destroy(self):
#     def rejoin(self):
#     def refresh_from_server(self):
#     def create_bot(self, name, avatar_url=None, callback_url=None, dm_notification=None,
#                    **kwargs):
#     def change_owners(self, user_id):
#     def get_membership(self):
#     def update_membership(self, nickname=None, **kwargs):
#     def leave(self):


from unittest import mock
from .base import get_fake_response, get_fake_member_data, get_fake_group_data
from .base import TestCase
from groupy import pagers
from groupy.api import groups



class GroupsTests(TestCase):
    def setUp(self):
        self.m_session = mock.Mock()
        self.groups = groups.Groups(self.m_session)


class RawListGroupsTests(GroupsTests):
    def setUp(self):
        super().setUp()

# Path: tests/api/base.py
# def get_fake_response(code=200, data=None):
#     response = mock.Mock()
#     response.status_code = code
#     response.data = data
#     return response
# 
# def get_fake_member_data(**kwargs):
#     data = {
#         'id': 'foo',
#         'user_id': 'baz',
#         'nickname': 'nick',
#     }
#     data.update(kwargs)
#     return data
# 
# def get_fake_group_data(**kwargs):
#     group_data = {
#         'id': 'foo',
#         'name': 'foobar',
#         'group_id': 'bar',
#         'created_at': 1302623328,
#         'updated_at': 1302623329,
#         'office_mode': False,
#     }
#     group_data.update(kwargs)
#     return group_data
# 
# Path: tests/api/base.py
# class TestCase(unittest.TestCase):
#     def assert_kwargs(self, mock, **kwargs):
#         __, m_kwargs = mock.call_args
#         for k, v in kwargs.items():
#             with self.subTest(key=k, value=v):
#                 self.assertEqual(m_kwargs.get(k), v)
# 
# Path: groupy/pagers.py
# class Pager:
# class GroupList(Pager):
# class ChatList(GroupList):
# class MessageList(Pager):
# class GalleryList(MessageList):
#     def __init__(self, manager, endpoint, **params):
#     def __getitem__(self, index):
#     def __iter__(self):
#     def set_next_page_params(self):
#     def fetch(self):
#     def fetch_next(self):
#     def autopage(self):
#     def set_next_page_params(self):
#     def __init__(self, manager, endpoint, **params):
#     def detect_mode(cls, **params):
#     def set_next_page_params(self):
#     def get_last_item_index(self):
#     def get_next_page_param(self, item):
#     def fetch_next(self):
#     def get_next_page_param(self, item):
# 
# Path: groupy/api/groups.py
# class Groups(base.Manager):
# class ChangeOwnersResult:
# class Group(base.ManagedResource):
#     def __init__(self, session):
#     def _raw_list(self, **params):
#     def list(self, page=1, per_page=10, omit=None):
#     def list_all(self, per_page=10, omit=None):
#     def list_former(self):
#     def get(self, id):
#     def create(self, name, description=None, image_url=None, share=None, **kwargs):
#     def update(self, id, name=None, description=None, image_url=None,
#                office_mode=None, share=None, **kwargs):
#     def destroy(self, id):
#     def join(self, group_id, share_token):
#     def rejoin(self, group_id):
#     def change_owners(self, group_id, owner_id):
#     def __init__(self, group_id, owner_id, status):
#     def is_success(self):
#     def __bool__(self):
#     def __init__(self, manager, **data):
#     def __repr__(self):
#     def __eq__(self, other):
#     def is_mine(self):
#     def post(self, text=None, attachments=None):
#     def update(self, name=None, description=None, image_url=None,
#                office_mode=None, share=None, **kwargs):
#     def destroy(self):
#     def rejoin(self):
#     def refresh_from_server(self):
#     def create_bot(self, name, avatar_url=None, callback_url=None, dm_notification=None,
#                    **kwargs):
#     def change_owners(self, user_id):
#     def get_membership(self):
#     def update_membership(self, nickname=None, **kwargs):
#     def leave(self):


# Path: tests/api/test_groups.py
from unittest import mock
from .base import get_fake_response, get_fake_member_data, get_fake_group_data
from .base import TestCase
from groupy import pagers
from groupy.api import groups




class GroupsTests(TestCase):
    def setUp(self):
        self.m_session = mock.Mock()
        self.groups = groups.Groups(self.m_session)


class RawListGroupsTests(GroupsTests):
    def setUp(self):
        super().setUp()

        group = get_fake_group_data()