tests.conftest.client()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nop 0
1
import pytest
2
from rest_framework.test import APIClient
3
4
pytest_plugins = 'tests.factories'
5
6
7
@pytest.fixture()
8
def client() -> APIClient:
9
    return APIClient()
10
11
12
@pytest.fixture()
13
def auth_client(client, user) -> client:
14
    client.force_login(user)
15
    return client
16