Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
sofide committed Jun 22, 2024
1 parent 5bbbe6a commit d159a53
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_views_v2.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""API v2 tests."""
import json

import pytest

from kilink.backend import kilinkbackend, KilinkDataTooBigError
from kilink.config import config, UNITTESTING_ENVIRONMENT_VALUE
from kilink.main import app
Expand All @@ -11,6 +9,7 @@

test_client = app.test_client()


class TestCreateLinkode:
EXPECTED_KEYS_IN_RESPONSE = [
"linkode_id",
Expand Down Expand Up @@ -74,7 +73,10 @@ def test_creates_linkode_without_content_returns_bad_request(self):
assert response.status_code == 400

def test_creates_linkode_when_content_too_long(self, mocker):
mocker.patch("kilink.views_v2.kilinkbackend.create_linkode", side_effect=KilinkDataTooBigError)
mocker.patch(
"kilink.views_v2.kilinkbackend.create_linkode",
side_effect=KilinkDataTooBigError
)
response = test_client.post("/api/2/linkode/", json={"content": "x"})

assert response.status_code == 413
Expand Down

0 comments on commit d159a53

Please sign in to comment.