Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNyl committed Nov 11, 2024
1 parent 13b36d5 commit 45cded2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/feedback/views/feedback.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters, status
from rest_framework.response import Response
from django_filters.rest_framework import DjangoFilterBackend

from app.common.pagination import BasePagination
from app.common.permissions import BasicViewPermission
Expand Down
14 changes: 7 additions & 7 deletions app/tests/feedback/test_feedback_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import pytest

from app.feedback.enums import Status
from app.feedback.factories.bug_factory import BugFactory
from app.feedback.factories.idea_factory import IdeaFactory
from app.util.test_utils import get_api_client
from app.feedback.enums import Status

FEEDBACK_BASE_URL = "/feedbacks/"

Expand Down Expand Up @@ -35,10 +35,10 @@ def test_list_feedback_with_both_bug_and_idea_as_member(member):
idea_type = list(filter(lambda x: "Idea" == x["feedback_type"], results))

assert response.status_code == status.HTTP_200_OK
assert data["count"] == 2
assert len(bug_type) == 1
assert len(idea_type) == 1
assert data["count"] == 2
assert len(bug_type) == 1
assert len(idea_type) == 1


@pytest.mark.django_db
def test_list_feedback_as_anonymous_user(default_client):
Expand Down Expand Up @@ -273,10 +273,10 @@ def test_filter_feedback_type_as_member(member, feedback_type):
assert response.status_code == status.HTTP_200_OK
assert data["count"] == 1
assert results[0]["feedback_type"] == feedback_type


@pytest.mark.django_db
def test_status_filter_as_member(member):
def test_status_filter_as_member(member):
"""A member should be able to filter feedbacks by status"""

BugFactory(author=member, status=Status.OPEN)
Expand Down

0 comments on commit 45cded2

Please sign in to comment.