# Path: tests/unit/v1/test__helpers.py
# class AsyncIter:
#     """Utility to help recreate the effect of an async generator. Useful when
#     you need to mock a system that requires `async for`.
#     """
# 
#     def __init__(self, items):
#         self.items = items
# 
#     async def __aiter__(self):
#         for i in self.items:
#             yield i
# 
# Path: tests/unit/v1/test__helpers.py
# class AsyncMock(mock.MagicMock):
#     async def __call__(self, *args, **kwargs):
#         return super(AsyncMock, self).__call__(*args, **kwargs)


import types
import mock
import pytest
    import google.auth.credentials
from tests.unit.v1.test__helpers import AsyncIter
from tests.unit.v1.test__helpers import AsyncMock
    from google.cloud.firestore_v1.async_collection import AsyncCollectionReference
    from google.cloud.firestore_v1.async_query import AsyncQuery
    from google.cloud.firestore_v1.async_collection import AsyncCollectionReference
    from google.cloud.firestore_v1.types import document
    from google.cloud.firestore_v1.async_document import AsyncDocumentReference
    from google.cloud.firestore_v1 import SERVER_TIMESTAMP
    from google.cloud.firestore_v1._helpers import pbs_for_create
    from google.cloud.firestore_v1.types import common
    from google.cloud.firestore_v1.types import document
    from google.cloud.firestore_v1.types import write
    from google.cloud.firestore_v1 import _helpers
    from google.cloud.firestore_v1.async_document import AsyncDocumentReference
    from google.cloud.firestore_v1 import _helpers
    from google.api_core.retry import Retry
    from google.cloud.firestore_v1.types import document
    from google.cloud.firestore_v1.types import firestore
    from google.cloud.firestore_v1 import _helpers
    from google.api_core.page_iterator_async import AsyncIterator
    from google.api_core.page_iterator import Page
    from google.cloud.firestore_v1.async_document import AsyncDocumentReference
    from google.cloud.firestore_v1.types.document import Document
    from google.api_core.retry import Retry
    from google.api_core.retry import Retry
    from google.api_core.retry import Retry
    from google.cloud.firestore_v1.async_query import AsyncQuery
    from google.cloud.firestore_v1.async_client import AsyncClient
# 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.





def _make_async_collection_reference(*args, **kwargs):

    return AsyncCollectionReference(*args, **kwargs)


def _get_public_methods(klass):
    return set().union(
        *(
            (
                name
                for name, value in class_.__dict__.items()
                if (not name.startswith("_") and isinstance(value, types.FunctionType))
            )
            for class_ in (klass,) + klass.__bases__
        )
    )


def test_asynccollectionreference_constructor():
    collection_id1 = "rooms"
    document_id = "roomA"

# Path: tests/unit/v1/test__helpers.py
# class AsyncIter:
#     """Utility to help recreate the effect of an async generator. Useful when
#     you need to mock a system that requires `async for`.
#     """
# 
#     def __init__(self, items):
#         self.items = items
# 
#     async def __aiter__(self):
#         for i in self.items:
#             yield i
# 
# Path: tests/unit/v1/test__helpers.py
# class AsyncMock(mock.MagicMock):
#     async def __call__(self, *args, **kwargs):
#         return super(AsyncMock, self).__call__(*args, **kwargs)


# Path: tests/unit/v1/test_async_collection.py
import types
import mock
import pytest
    import google.auth.credentials
from tests.unit.v1.test__helpers import AsyncIter
from tests.unit.v1.test__helpers import AsyncMock
    from google.cloud.firestore_v1.async_collection import AsyncCollectionReference
    from google.cloud.firestore_v1.async_query import AsyncQuery
    from google.cloud.firestore_v1.async_collection import AsyncCollectionReference
    from google.cloud.firestore_v1.types import document
    from google.cloud.firestore_v1.async_document import AsyncDocumentReference
    from google.cloud.firestore_v1 import SERVER_TIMESTAMP
    from google.cloud.firestore_v1._helpers import pbs_for_create
    from google.cloud.firestore_v1.types import common
    from google.cloud.firestore_v1.types import document
    from google.cloud.firestore_v1.types import write
    from google.cloud.firestore_v1 import _helpers
    from google.cloud.firestore_v1.async_document import AsyncDocumentReference
    from google.cloud.firestore_v1 import _helpers
    from google.api_core.retry import Retry
    from google.cloud.firestore_v1.types import document
    from google.cloud.firestore_v1.types import firestore
    from google.cloud.firestore_v1 import _helpers
    from google.api_core.page_iterator_async import AsyncIterator
    from google.api_core.page_iterator import Page
    from google.cloud.firestore_v1.async_document import AsyncDocumentReference
    from google.cloud.firestore_v1.types.document import Document
    from google.api_core.retry import Retry
    from google.api_core.retry import Retry
    from google.api_core.retry import Retry
    from google.cloud.firestore_v1.async_query import AsyncQuery
    from google.cloud.firestore_v1.async_client import AsyncClient

# 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.





def _make_async_collection_reference(*args, **kwargs):

    return AsyncCollectionReference(*args, **kwargs)


def _get_public_methods(klass):
    return set().union(
        *(
            (
                name
                for name, value in class_.__dict__.items()
                if (not name.startswith("_") and isinstance(value, types.FunctionType))
            )
            for class_ in (klass,) + klass.__bases__
        )
    )


def test_asynccollectionreference_constructor():
    collection_id1 = "rooms"
    document_id = "roomA"

    collection_id2 = "messages"