[codestyle] add type hint to fixture, indicating it is a function that we need to call
This commit is contained in:
parent
246c22ce39
commit
16503bea7a
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
from typing import Callable
|
||||||
import pytest
|
import pytest
|
||||||
from django.test import Client
|
from django.test import Client
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
@ -41,7 +42,7 @@ def test_entering_same_name_twice_does_not_change_database_entry(data, session:
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_enter_endpoint_accepts_only_post_requests(
|
def test_enter_endpoint_accepts_only_post_requests(
|
||||||
client: Client, http_method: str, expected_status: int, random_name
|
client: Client, http_method: str, expected_status: int, random_name: Callable[[int], str]
|
||||||
):
|
):
|
||||||
request_method = getattr(client, http_method.lower())
|
request_method = getattr(client, http_method.lower())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue