File: test_deprecated.py

package info (click to toggle)
python-beanie 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,480 kB
  • sloc: python: 14,427; makefile: 7; sh: 6
file content (14 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pytest

from beanie import init_beanie
from beanie.exceptions import Deprecation
from tests.odm.models import DocWithCollectionInnerClass


class TestDeprecations:
    async def test_doc_with_inner_collection_class_init(self, db):
        with pytest.raises(Deprecation):
            await init_beanie(
                database=db,
                document_models=[DocWithCollectionInnerClass],
            )