# 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):


from memsource import models
import unittest


class TestModelsAsynchronousResponse(unittest.TestCase):
    def make_model(self, source):
        return models.AsynchronousResponse(source)

    def test_is_complete(self):
        self.assertFalse(self.make_model({}).is_complete())

        self.assertTrue(self.make_model({'error': None}).is_complete())


# 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: test/models/test_asynchronous_response.py
from memsource import models
import unittest



class TestModelsAsynchronousResponse(unittest.TestCase):
    def make_model(self, source):
        return models.AsynchronousResponse(source)

    def test_is_complete(self):
        self.assertFalse(self.make_model({}).is_complete())

        self.assertTrue(self.make_model({'error': None}).is_complete())


    def test_has_error(self):