FakeDjangoModel.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
from typing import Any
2
3
import pytest
4
5
from lagom import Container
6
from lagom.experimental.integrations.django import DjangoIntegration
7
8
9
class FakeDjangoManager:
10
    pass
11
12
13
class FakeDjangoModel:
14
    data: Any
15
    objects = FakeDjangoManager()
16
    custom_manager = FakeDjangoManager()
17
18
    def __init__(self, **kwargs):
19
        self.data = kwargs
20
21
22
@pytest.fixture(scope="function")
23
def django_integration():
24
    return DjangoIntegration(Container(), models=[FakeDjangoModel])
25