tests.conftest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A auth_client() 0 4 1
A client() 0 3 1
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