from django.urls import reverse
from rest_framework.test import APITestCase

from core.tests.factories.approvals import ApprovalsFactory
from core.tests.factories.release import ReleaseFactory


class ApprovalsViewSetTest(APITestCase):
    def setUp(self):
        self.release = ReleaseFactory()
        self.approval = ApprovalsFactory(approved=False, release=self.release)

    def test_approval_get_by_token(self):
        url = reverse("approval-list") + f"?token={self.approval.token}"
        resp = self.client.get(url)
        self.assertEqual(resp.status_code, 200)

dfe520cb4000b3cf6362b712f50c9fb2db10b99f
<mask token>


class ApprovalsViewSetTest(APITestCase):
    <mask token>
    <mask token>

<mask token>


class ApprovalsViewSetTest(APITestCase):

    def setUp(self):
        self.release = ReleaseFactory()
        self.approval = ApprovalsFactory(approved=False, release=self.release)
    <mask token>

<mask token>


class ApprovalsViewSetTest(APITestCase):

    def setUp(self):
        self.release = ReleaseFactory()
        self.approval = ApprovalsFactory(approved=False, release=self.release)

    def test_approval_get_by_token(self):
        url = reverse('approval-list') + f'?token={self.approval.token}'
        resp = self.client.get(url)
        self.assertEqual(resp.status_code, 200)

from django.urls import reverse
from rest_framework.test import APITestCase
from core.tests.factories.approvals import ApprovalsFactory
from core.tests.factories.release import ReleaseFactory


class ApprovalsViewSetTest(APITestCase):

    def setUp(self):
        self.release = ReleaseFactory()
        self.approval = ApprovalsFactory(approved=False, release=self.release)

    def test_approval_get_by_token(self):
        url = reverse('approval-list') + f'?token={self.approval.token}'
        resp = self.client.get(url)
        self.assertEqual(resp.status_code, 200)

from django.urls import reverse
from rest_framework.test import APITestCase

from core.tests.factories.approvals import ApprovalsFactory
from core.tests.factories.release import ReleaseFactory


class ApprovalsViewSetTest(APITestCase):
    def setUp(self):
        self.release = ReleaseFactory()
        self.approval = ApprovalsFactory(approved=False, release=self.release)

    def test_approval_get_by_token(self):
        url = reverse("approval-list") + f"?token={self.approval.token}"
        resp = self.client.get(url)
        self.assertEqual(resp.status_code, 200)
