-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from django.test import TestCase | ||
from django.http import HttpResponse | ||
from django.urls import reverse | ||
|
||
from rest_framework.test import APIClient | ||
|
||
|
||
class CustomTestCase(TestCase): | ||
def setUp(self) -> None: | ||
self.client: APIClient = APIClient() | ||
|
||
class DonationsAPIViewTests(CustomTestCase): | ||
url: str = reverse('api:donation:index') | ||
|
||
def test_get_method(self) -> None: | ||
response: HttpResponse = self.client.get(self.url) | ||
self.assertEqual(response.status_code, 200) | ||
|
||
class DonationSectionsAPIViewTests(CustomTestCase): | ||
url: str = reverse('api:donation:sections') | ||
|
||
def test_get_method(self) -> None: | ||
response: HttpResponse = self.client.get(self.url) | ||
self.assertEqual(response.status_code, 200) | ||
|
||
class DonationButtonsAPIViewTests(CustomTestCase): | ||
url: str = reverse('api:donation:buttons') | ||
|
||
def test_get_method(self) -> None: | ||
response: HttpResponse = self.client.get(self.url) | ||
self.assertEqual(response.status_code, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters