Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
backface committed Aug 21, 2024
1 parent 936c4eb commit e24a03d
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 296 deletions.
Empty file removed apps/blog.X/__init__.py
Empty file.
6 changes: 0 additions & 6 deletions apps/blog.X/admin.py

This file was deleted.

7 changes: 0 additions & 7 deletions apps/blog.X/apps.py

This file was deleted.

111 changes: 0 additions & 111 deletions apps/blog.X/migrations/0001_initial.py

This file was deleted.

Empty file removed apps/blog.X/migrations/__init__.py
Empty file.
71 changes: 0 additions & 71 deletions apps/blog.X/models.py

This file was deleted.

1 change: 0 additions & 1 deletion apps/blog.X/tests.py

This file was deleted.

69 changes: 0 additions & 69 deletions apps/blog.X/views.py

This file was deleted.

5 changes: 4 additions & 1 deletion apps/classrooms/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group as AuthGroup
from .models import Group, Unit, Membership, TrainerRequest
from .forms import TrainerRequestForm

User = get_user_model()


# created with Claude Sonnet
# TODO: unit test for units!

class GroupViewTests(TestCase):
def setUp(self):
# Create test users and groups
Expand Down
14 changes: 14 additions & 0 deletions apps/pages/tests.py
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# Create your tests here.
from django.test import TestCase, Client
from django.urls import reverse
from .models import Page

class PageViewTest(TestCase):
def setUp(self):
self.client = Client()
self.page = Page.objects.create(title='Test Page', content='Test Content')

def test_view_page(self):
url = reverse('pages:view', args=[self.page.slug])
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertContains(response, 'Test Content')
Loading

0 comments on commit e24a03d

Please sign in to comment.