# Path: muranoclient/common/base.py
# def getid(obj):
#     def __init__(self, api):
#     def _list(self, url, response_key=None, obj_class=None,
#               data=None, headers=None):
#     def _delete(self, url, headers=None):
#     def _update(self, url, data, response_key=None, return_raw=False,
#                 headers=None, method='PUT', content_type='application/json'):
#     def _create(self, url, data=None, response_key=None,
#                 return_raw=False, headers=None):
#     def _get(self, url, response_key=None, return_raw=False, headers=None):
#     def list(self):
#     def find(self, **kwargs):
#     def findall(self, **kwargs):
#     def __init__(self, manager, info, loaded=False):
#     def _add_details(self, info):
#     def __setstate__(self, d):
#     def __getattr__(self, k):
#     def __repr__(self):
#     def get(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def is_loaded(self):
#     def set_loaded(self, val):
#     def to_dict(self):
# class Manager(object):
# class ManagerWithFind(Manager, metaclass=abc.ABCMeta):
# class Resource(object):
# 
# Path: muranoclient/v1/packages.py
# DEFAULT_PAGE_SIZE = 20
# class Package(base.Resource):
# class PackageManager(base.Manager):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def create(self, data, files):
#     def get(self, app_id):
#     def filter(self, **kwargs):
#         def construct_url(params):
#         def paginate(_url):
#     def list(self, include_disabled=False, limit=20):
#     def delete(self, app_id):
#     def update(self, app_id, body, operation='replace'):
#     def download(self, app_id):
#     def toggle_active(self, app_id):
#     def toggle_public(self, app_id):
#     def get_ui(self, app_id, loader_cls=None):
#     def get_logo(self, app_id):
#     def get_supplier_logo(self, app_id):


import testtools
from muranoclient.common import base
from muranoclient.v1 import packages
# Copyright 2015 Huawei.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.




class BaseTest(testtools.TestCase):

    def test_two_resources_with_same_id_are_not_equal(self):
        # Two resources with same ID: never equal if their info is not equal
        r1 = base.Resource(None, {'id': 1, 'name': 'hi'})
        r2 = base.Resource(None, {'id': 1, 'name': 'hello'})
        self.assertNotEqual(r1, r2)

    def test_two_resources_with_same_id_and_info_are_equal(self):
        # Two resources with same ID: equal if their info is equal
        r1 = base.Resource(None, {'id': 1, 'name': 'hello'})

# Path: muranoclient/common/base.py
# def getid(obj):
#     def __init__(self, api):
#     def _list(self, url, response_key=None, obj_class=None,
#               data=None, headers=None):
#     def _delete(self, url, headers=None):
#     def _update(self, url, data, response_key=None, return_raw=False,
#                 headers=None, method='PUT', content_type='application/json'):
#     def _create(self, url, data=None, response_key=None,
#                 return_raw=False, headers=None):
#     def _get(self, url, response_key=None, return_raw=False, headers=None):
#     def list(self):
#     def find(self, **kwargs):
#     def findall(self, **kwargs):
#     def __init__(self, manager, info, loaded=False):
#     def _add_details(self, info):
#     def __setstate__(self, d):
#     def __getattr__(self, k):
#     def __repr__(self):
#     def get(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def is_loaded(self):
#     def set_loaded(self, val):
#     def to_dict(self):
# class Manager(object):
# class ManagerWithFind(Manager, metaclass=abc.ABCMeta):
# class Resource(object):
# 
# Path: muranoclient/v1/packages.py
# DEFAULT_PAGE_SIZE = 20
# class Package(base.Resource):
# class PackageManager(base.Manager):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def create(self, data, files):
#     def get(self, app_id):
#     def filter(self, **kwargs):
#         def construct_url(params):
#         def paginate(_url):
#     def list(self, include_disabled=False, limit=20):
#     def delete(self, app_id):
#     def update(self, app_id, body, operation='replace'):
#     def download(self, app_id):
#     def toggle_active(self, app_id):
#     def toggle_public(self, app_id):
#     def get_ui(self, app_id, loader_cls=None):
#     def get_logo(self, app_id):
#     def get_supplier_logo(self, app_id):


# Path: muranoclient/tests/unit/test_base.py
import testtools
from muranoclient.common import base
from muranoclient.v1 import packages

# Copyright 2015 Huawei.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.




class BaseTest(testtools.TestCase):

    def test_two_resources_with_same_id_are_not_equal(self):
        # Two resources with same ID: never equal if their info is not equal
        r1 = base.Resource(None, {'id': 1, 'name': 'hi'})
        r2 = base.Resource(None, {'id': 1, 'name': 'hello'})
        self.assertNotEqual(r1, r2)

    def test_two_resources_with_same_id_and_info_are_equal(self):
        # Two resources with same ID: equal if their info is equal
        r1 = base.Resource(None, {'id': 1, 'name': 'hello'})

        r2 = base.Resource(None, {'id': 1, 'name': 'hello'})