# Path: memsource/models.py
# class BaseModel(dict):
# class User(BaseModel):
# class Authentication(BaseModel):
# class Client(BaseModel):
# class Domain(BaseModel):
# class Language(BaseModel):
# class Project(BaseModel):
# class Job(BaseModel):
# class JobPart(BaseModel):
# class TranslationMemory(BaseModel):
# class AsynchronousRequest(BaseModel):
# class AsynchronousResponse(BaseModel):
# class Segment(BaseModel):
# class SegmentSearchResult(BaseModel):
# class Analysis(BaseModel):
# class MxliffUnit(BaseModel):
# class TermBase(BaseModel):
#     def __getattr__(self, key):
#     def _iso8601_to_datetime(self, source):
#     def date_created(self):
#     def __init__(self, source):
#     def is_complete(self):
#     def has_error(self):
# 
# Path: memsource/api_rest/client.py
# class Client(api_rest.BaseApi):
#     # Document: https://cloud.memsource.com/web/docs/api#tag/Client
# 
#     def create(self, name: str) -> str:
#         return self._post("v1/client", {"name": name})["id"]
# 
#     def get(self, clientID: int) -> models.Client:
#         return models.Client(self._get("v1/clients/{}".format(clientID)))
# 
#     def list(self, page: int=0) -> List[models.Client]:
#         clients = self._get("v1/clients", {"page": page})
#         return [models.Client(client) for client in clients.get("content", [])]


import requests
import unittest
from unittest.mock import patch
from memsource import models
from memsource.api_rest.client import Client
            "priceList": None,
            "displayNoteInProject": False,
            "name": "1",
            "createdBy": {
                "id": "1",
                "email": "mock-tm@gengo.com",
                "uid": "1234",
                "firstName": "mock-first-name",
                "lastName": "mock-last-name",
                "userName": "mock-tm", "role": "ADMIN"
            },
            "netRateScheme": None,
            "externalId": None
        }]
        self.assertListEqual(response, expected)
        self.assertIsInstance(response[0], models.Client)

    @patch.object(requests.Session, "request")
    def test_list_none(self, mock_request: unittest.mock):
        ms_response = unittest.mock.MagicMock(status_code=200)
        ms_response.json.return_value = {
            "totalPages": 0,
            "numberOfElements": 0,
            "totalElements": 0,
            "pageSize": 50,
            "pageNumber": 0,
            "content": []
        }
        mock_request.return_value = ms_response


# Path: memsource/models.py
# class BaseModel(dict):
# class User(BaseModel):
# class Authentication(BaseModel):
# class Client(BaseModel):
# class Domain(BaseModel):
# class Language(BaseModel):
# class Project(BaseModel):
# class Job(BaseModel):
# class JobPart(BaseModel):
# class TranslationMemory(BaseModel):
# class AsynchronousRequest(BaseModel):
# class AsynchronousResponse(BaseModel):
# class Segment(BaseModel):
# class SegmentSearchResult(BaseModel):
# class Analysis(BaseModel):
# class MxliffUnit(BaseModel):
# class TermBase(BaseModel):
#     def __getattr__(self, key):
#     def _iso8601_to_datetime(self, source):
#     def date_created(self):
#     def __init__(self, source):
#     def is_complete(self):
#     def has_error(self):
# 
# Path: memsource/api_rest/client.py
# class Client(api_rest.BaseApi):
#     # Document: https://cloud.memsource.com/web/docs/api#tag/Client
# 
#     def create(self, name: str) -> str:
#         return self._post("v1/client", {"name": name})["id"]
# 
#     def get(self, clientID: int) -> models.Client:
#         return models.Client(self._get("v1/clients/{}".format(clientID)))
# 
#     def list(self, page: int=0) -> List[models.Client]:
#         clients = self._get("v1/clients", {"page": page})
#         return [models.Client(client) for client in clients.get("content", [])]


# Path: test/api_rest/test_client.py
import requests
import unittest
from unittest.mock import patch
from memsource import models
from memsource.api_rest.client import Client

            "priceList": None,
            "displayNoteInProject": False,
            "name": "1",
            "createdBy": {
                "id": "1",
                "email": "mock-tm@gengo.com",
                "uid": "1234",
                "firstName": "mock-first-name",
                "lastName": "mock-last-name",
                "userName": "mock-tm", "role": "ADMIN"
            },
            "netRateScheme": None,
            "externalId": None
        }]
        self.assertListEqual(response, expected)
        self.assertIsInstance(response[0], models.Client)

    @patch.object(requests.Session, "request")
    def test_list_none(self, mock_request: unittest.mock):
        ms_response = unittest.mock.MagicMock(status_code=200)
        ms_response.json.return_value = {
            "totalPages": 0,
            "numberOfElements": 0,
            "totalElements": 0,
            "pageSize": 50,
            "pageNumber": 0,
            "content": []
        }
        mock_request.return_value = ms_response


        response = Client(token="mock-token").list()